Installation of Zabbix in Centos 7
-
What may be the issue with this?
-
Logged in now with proper username and password
-
Create MySQL database and user for Zabbix
Login to MariaDB prompt with command:
mysql -u root -p
Create a database called ‘zabbixdb’ and database user called ‘zabbixuser’.Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.41-MariaDB MariaDB ServerCopyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database zabbixdb character set utf8;
Query OK, 1 row affected (0.05 sec)MariaDB [(none)]> grant all privileges on zabbixdb.* to 'zabbixuser'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.21 sec)MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)MariaDB [(none)]> exit
Bye -
Error comes here??
[lakshmana@dny-lnx-zabbix ~]$ mysql -u zabbixuser -p zabbixdb < /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql
-bash: /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql: No such file or directory -
Well that password needs to be changed now
-
@Lakshmana said:
[lakshmana@dny-lnx-zabbix ~]$ mysql -u zabbixuser -p zabbixdb < /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql
Well the error tells us that this file does not exist. Have you looked for it yet?
-
@scottalanmiller said:
The EPEL is already installed as part of a base install
No it is not.
The default install choice is the minimal package. That has never included EPEL.
-
I have verified that the file is present in the path
But the error is coming. Why?? -
Whether any issue in the permission of the files.since the files has the following permission
-rw-r--r-- 1 root root 1978341 Aug 10 04:57 images.sql
-rw-r--r-- 1 root root 104816 Aug 10 04:58 schema.sql
-rw-r--r-- 1 root root 972942 Aug 10 13:16 data.sql
drwxr-xr-x 4 root root 4096 Sep 7 12:38 .. -
@JaredBusch said:
@scottalanmiller said:
The EPEL is already installed as part of a base install
No it is not.
You are missing context. He is on an NTG Lab machine where the base install installs it. It was in the base install handed to him.
-
@Lakshmana said:
I have verified that the file is present in the path
But the error is coming. Why??How did you verify? I verified on the same box and the file is not there.
file /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql /usr/share/doc/zabbix-server-mysql-2.4.5/create/schema.sql: cannot open (No such file or directory)
-
@Lakshmana said:
Whether any issue in the permission of the files.since the files has the following permission
-rw-r--r-- 1 root root 1978341 Aug 10 04:57 images.sql
-rw-r--r-- 1 root root 104816 Aug 10 04:58 schema.sql
-rw-r--r-- 1 root root 972942 Aug 10 13:16 data.sql
drwxr-xr-x 4 root root 4096 Sep 7 12:38 ..Since the file does not exist, permissions will not be the issue.
-
I verified there by using this command
cd /usr/share/doc/zabbix-server-mysql-2.4.5/create/
ls
there are three files in it -
@Lakshmana said:
I verified there by using this command
cd /usr/share/doc/zabbix-server-mysql-2.4.5/create/
ls
there are three files in itThat's odd since that cd command does not work on that box. The directory is not there.
-
I verified this link and they have provided link for the soluton in it
https://www.zabbix.com/forum/showthread.php?t=48111
After seeing this i have done and the error comes is given below
lakshmana@dny-lnx-zabbix create]$ sudo mysql -uroot zabbix < schema.sql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) -
@Lakshmana said:
I verified this link and they have provided link for the soluton in it
The solution, I assume, was to use the correct version path, 2.4.6.
-
@Lakshmana said:
lakshmana@dny-lnx-zabbix create]$ sudo mysql -uroot zabbix < schema.sql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)You need to add the password since you set one earlier. Add a -p and the password and it should work fine.
-
How to login my SQL to check whether it is logging properly?
-
@Lakshmana said:
How to login my SQL to check whether it is logging properly?
Just use the command..
mysql -u root -p password
Where "password" is the actual password. Keep in mind that SQL is a language, you can't log into it. MariaDB is a relational database management system. So you can log into MariaDB and talk to it using the SQL language, but you can't log into a language.
-
when I used the above command i can login to the MariaDB but when i use the command to import the template the same error coming in the terminal