How to change Zabbix database password

In this post, I will show you 2 simple steps on how to change the zabbix DB password from “zabbix” to something else. This comes in handy when you are running zabbix in a LIVE environment and you want to secure the DB connection password.

Step 1. Update zabbix_server.confzabbix.conf.php configuration files

– Log into zabbix, enter the command “vi /etc/zabbix/zabbix_server.conf” to edit the zabbix_server.conf file. Locate the line DBPassword= and change the password. Exit edit mode


– Next enter the command “vi /etc/zabbix/web/zabbix.conf.php” to edit the zabbix.conf.php file. Locate the line $DB[‘PASSWORD’] = and change the password to same above. Exit edit mode


– Restart zabbix server by tying ‘[highlight]service zabbix-server restart[/highlight]’ for the changes to take effect

Step 2. Update zabbix user mySQL password

– Log into mysql with command ‘mysql -u root -p ‘. Run the following command to change the zabbix user password to the new password:

SET PASSWORD FOR ‘zabbix’@’localhost’ = PASSWORD(‘G00glezabbix‘);
flush privileges;

Exit mysql and that’s it. Your zabbix web interface should now be accessible.

comments powered by Disqus