Does your Zabbix tries to connect to the wrong database? We can help you fix the issue.
Here at Bobcares, we have seen several such errors while troubleshooting Zabbix issues as part of our Server Management Services for web hosts and online service providers.
Today, let us see how our Support Engineers resolve this problem.
What to do when Zabbix tries to connect to the wrong database
Recently, one of our customers approached us saying that he has a Zabbix server installed on a CentOS 7 remote server, but can’t get it running.
Here is the error message that he can see in /var/log/zabbix/.
[Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)
The customer has a database for Zabbix, but it is named zabbixdb, not Zabbix (as in the error message)
Now let’s see how our Support Engineers help our customers resolve this error.
We suggested restarting the service and check if it still tries to use the Zabbix database in the logs.
In case, if it still uses the Zabbix database then we suggested checking if there are any duplicate DBName entries in zabbix_server.conf. For that, use the below command.
grep DBName /etc/zabbix/zabbix_server.conf
Removing the duplicate entries must resolve the error.
Also, we suggest to re-check the Zabbix configuration file present in /etc/zabbix/web/zabbix.conf.php.
The database credentials will be present at a lower level in the file. So make sure not to add them at the top as it can be overwritten in memory.
So, make sure to check those variables present at the lower level in the configuration file.
[Need any further assistance in fixing Zabbix errors? – We’re available 24*7]
Conclusion
In short, when Zabbix tries to connect to the wrong database, we can simply resolve it by restarting the service. Today, we saw the resolution to this Zabbix error provided by our Support Engineers.
0 Comments