Poller stopped working. Could not connect to MySQL database!

yep I also had the same problem - graphs stopped working after the daily update ~24-48 hours ago.

The following was being output by the poller cron:

Cronic detected failure or error output for the command:
/opt/librenms/poller-wrapper.py 32



ERROR: Could not connect to MySQL database!
ERROR: (1045, "Access denied for user 'librenms'@'' (using password: YES)")

I then specified $config[‘db_socket’] = ‘/var/lib/mysql/mysql.sock’; in the config.php per the info in this thread (it was previously set to null/’’) and that has now fixed the problem.

Hi @meliux

I’ve splitted the post as your issue is different from the other.

Yours is related to mysql/python.

Do you have more than 1 bind-address line in the mysql conf?

no… in fact bind-address is not specified at all in /etc/my.cnf. It has defaulted to listening on
centos 7 mariadb 5.5.

This same issue was being discussed in discord when you opened the thread, but I think there was some differences and no solution were found.

I’ll try to keep you updated

Issue got resolved after changing , in config.php the following

$config[‘db_host’] = ‘localhost’;
$config[‘db_host’] = ‘’;

Just for testing… Do you mind adding ::1 (localhost ipv6 address) to the database librenms user as allowed then test localhost again?

ok here’s what I did:

  • confirmed ‘localhost’ exists in /etc/hosts as both and ::1 (no changes)
  • added ‘librenms’@’::1’ to the mysql users table and granted privileges
  • set “bind-address=::” in my.cnf to get mysql to listen on both ipv4 and ipv6 all addresses. Default was ipv4 only.
  • updated librenms config.php to $config[‘db_host’] = ‘localhost’; and $config[‘db_socket’] = ‘’;

poller-wrapper.py now runs without any problems.

Presumably with the python 3 update of the poller scripts last week it now prefers v6 over v4 when the hostname resolves to both.