I had a successful zabbix 3.4 server running in an LXC container (CentOS7 base) with an embedded database for month, and I decided to join all container databases on my server into one.
So I have dumped the zabbix database, moved it to the container, made its 3306 port available.
From the Zabbix container, I can successfully log into the mysql using the command-line. The server backend seems to be able to after updating
Problem is the frontend still tries to contact the mysql through a local socket :
Error connecting to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I have tried to rename
/usr/share/zabbix/conf/zabbix.conf.php and put database configuration in it but it doesn't change anything. I have tried to grep through the whole
/usr/share/zabbix directory for my database credentials without success.
Where are stored the frontend database configurations ? Or am I doing anything wrong ?
# grep ^DB /etc/zabbix/zabbix_server.conf DBHost=mysql.host #local host name DBName=zabbix DBUser=zabbix DBPassword=******* DBPort=3306 # cat zabbix.conf.php <?php // Zabbix GUI configuration file. global $DB; $DB['TYPE'] = 'MYSQL'; $DB['SERVER'] = 'mysql.host'; $DB['PORT'] = '3306'; $DB['DATABASE'] = 'zabbix'; $DB['USER'] = 'zabbix'; $DB['PASSWORD'] = '******'; ...