Hello,
I've installed a Zabbix server in version 5.4 with a debian 10 (no SELinux), MySQL and Apache2. In standard configuration, everything works fine and I could move the repository of this default instance on a dedicated partition.
Then I've wanted to share this Zabbix server host (a VM in fact) with a Syslog Server, with 2 separated MySQL database repositories. And so I had to change :
> MySQL config file /etc/mysql/my.cnf :
- comment the [mysqld] group which is no more usefull
- create the [mysql_multi] group
- create the [mysql1] group pour the Zabbix instance (datadir, socket and port are specific)
- create the [mysql2] group pour the Syslog instance (datadir, socket and port are specific)
--> I could start both instances sucessfully
> Zabbix-server config file /etc/zabbix/zabbix_server.conf
- change the DBSocket and the DBPort (the DBName and other MySQL parameters remain the same)
--> Zabbix Server starts without error, even with a DBName=4
So it looks like the relation between Zabbix Server and MySQL is OK : zabbix data polling is well stored in MySQL Zabbix database.
But when I try to connect the Zabbix management page (HTTP://[ServerHost]/zabbix), it shows a "Database error : No such file or directory".
So I suspected an issue between the frontend and Mysql.
Indeed I found the Zabbix PHP config file /etc/zabbix/web/zabbix.conf.php where I could change the $DB['PORT'] parameter. But this config file doesn't refer to the MySQL socket.
So I investigated a bit further and thanks to this post (https://www.zabbix.com/forum/zabbix-...mote-db-server) I found this PHP config file /etc/php/7.3/cli/php.ini where I changed 2 socket parameters :
> pdo_mysql.default_socket= /var/run/mysqld/mysqld1.sock
> mysqli.default_socket = /var/run/mysqld/mysqld1.sock
where mysqld1.sock is off course the specific socket used for the dedicated Zabbix Server MySQL instance.
But the issue remains the same : "Database error : No such file or directory" on the frontend. While Apache2 doesn't show any error in its logs (the HTML page is correctly rendered).
Any suggestion to solve this issue would be appreciated. Thanks !
I've installed a Zabbix server in version 5.4 with a debian 10 (no SELinux), MySQL and Apache2. In standard configuration, everything works fine and I could move the repository of this default instance on a dedicated partition.
Then I've wanted to share this Zabbix server host (a VM in fact) with a Syslog Server, with 2 separated MySQL database repositories. And so I had to change :
> MySQL config file /etc/mysql/my.cnf :
- comment the [mysqld] group which is no more usefull
- create the [mysql_multi] group
- create the [mysql1] group pour the Zabbix instance (datadir, socket and port are specific)
- create the [mysql2] group pour the Syslog instance (datadir, socket and port are specific)
--> I could start both instances sucessfully
> Zabbix-server config file /etc/zabbix/zabbix_server.conf
- change the DBSocket and the DBPort (the DBName and other MySQL parameters remain the same)
--> Zabbix Server starts without error, even with a DBName=4
So it looks like the relation between Zabbix Server and MySQL is OK : zabbix data polling is well stored in MySQL Zabbix database.
But when I try to connect the Zabbix management page (HTTP://[ServerHost]/zabbix), it shows a "Database error : No such file or directory".
So I suspected an issue between the frontend and Mysql.
Indeed I found the Zabbix PHP config file /etc/zabbix/web/zabbix.conf.php where I could change the $DB['PORT'] parameter. But this config file doesn't refer to the MySQL socket.
So I investigated a bit further and thanks to this post (https://www.zabbix.com/forum/zabbix-...mote-db-server) I found this PHP config file /etc/php/7.3/cli/php.ini where I changed 2 socket parameters :
> pdo_mysql.default_socket= /var/run/mysqld/mysqld1.sock
> mysqli.default_socket = /var/run/mysqld/mysqld1.sock
where mysqld1.sock is off course the specific socket used for the dedicated Zabbix Server MySQL instance.
But the issue remains the same : "Database error : No such file or directory" on the frontend. While Apache2 doesn't show any error in its logs (the HTML page is correctly rendered).
Any suggestion to solve this issue would be appreciated. Thanks !
Comment