I am trying to install zabbix on Cento 7 uname -a 3.10.0-862.11.6.el7.x86_64.\
Followed the below post to install and configure.
My database configuration
Logs:
20100:20180820:184344.548 [Z3005] query failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [select escalationid,actionid,triggerid,eventid,r_eventid, nextcheck,esc_step,status,itemid from escalations where triggerid is not null order by actionid,triggerid,itemid,escalationid]
20100:20180820:184344.548 [Z3001] connection to database 'zabbixdb' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
20100:20180820:184344.548 database is down: reconnecting in 10 seconds
20103:20180820:184345.539 [Z3005] query failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [select taskid,type from task order by taskid]
20103:20180820:184345.539 [Z3001] connection to database 'zabbixdb' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
20103:20180820:184345.540 database is down: reconnecting in 10 seconds
MariaDB [(none)]> SELECT User, Db, Host from mysql.db;
+--------+-----------+-----------+
| User | Db | Host |
+--------+-----------+-----------+
| | test | % |
| | test\_% | % |
| zabbix | zabbix_db | localhost |
| zabbix | zabbixdb | localhost |
+--------+-----------+-----------+
4 rows in set (0.00 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
| zabbixdb |
+--------------------+
5 rows in set (0.00 sec)
MariaDB [(none)]>
### Option: DBHost
DBHost=localhost
### Option: DBName
# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
# DBName=
DBName=zabbixdb
### Option: DBSchema
# Schema name. Used for IBM DB2 and PostgreSQL.
# DBSchema=
### Option: DBUser
# DBUser=
DBUser=zabbix
### Option: DBPassword
DBPassword=redhat
### Option: DBSocket
# DBSocket=/tmp/mysql.sock
### Option: DBPort
# DBPort=3306
### Option: StartDBSyncers
# Number of pre-forked instances of DB Syncers.
# StartDBSyncers=4
[root@monitoring zabbix]#
Followed the below post to install and configure.
My database configuration
Logs:
20100:20180820:184344.548 [Z3005] query failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [select escalationid,actionid,triggerid,eventid,r_eventid, nextcheck,esc_step,status,itemid from escalations where triggerid is not null order by actionid,triggerid,itemid,escalationid]
20100:20180820:184344.548 [Z3001] connection to database 'zabbixdb' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
20100:20180820:184344.548 database is down: reconnecting in 10 seconds
20103:20180820:184345.539 [Z3005] query failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [select taskid,type from task order by taskid]
20103:20180820:184345.539 [Z3001] connection to database 'zabbixdb' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
20103:20180820:184345.540 database is down: reconnecting in 10 seconds
MariaDB [(none)]> SELECT User, Db, Host from mysql.db;
+--------+-----------+-----------+
| User | Db | Host |
+--------+-----------+-----------+
| | test | % |
| | test\_% | % |
| zabbix | zabbix_db | localhost |
| zabbix | zabbixdb | localhost |
+--------+-----------+-----------+
4 rows in set (0.00 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
| zabbixdb |
+--------------------+
5 rows in set (0.00 sec)
MariaDB [(none)]>
### Option: DBHost
DBHost=localhost
### Option: DBName
# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
# DBName=
DBName=zabbixdb
### Option: DBSchema
# Schema name. Used for IBM DB2 and PostgreSQL.
# DBSchema=
### Option: DBUser
# DBUser=
DBUser=zabbix
### Option: DBPassword
DBPassword=redhat
### Option: DBSocket
# DBSocket=/tmp/mysql.sock
### Option: DBPort
# DBPort=3306
### Option: StartDBSyncers
# Number of pre-forked instances of DB Syncers.
# StartDBSyncers=4
[root@monitoring zabbix]#
Comment