[email protected]:~$ ./poller-wrapper.py
ERROR: Could not connect to MySQL database!
ERROR: (1045, "Access denied for user 'librenms'@'127.0.0.1' (using password: YES)")
[email protected]:/opt/librenms$ grep " $" .env
[email protected]:/opt/librenms$ grep DB .env
DB_HOST=localhost
DB_DATABASE=librenms
DB_USERNAME=librenms
DB_PASSWORD=Pass12$
[email protected]:/opt/librenms$ mysql -u librenms -pPass12$ librenms
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 4066896
Server version: 10.3.22-MariaDB-0+deb10u1 Debian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
As far as I can see it seems python related; not MySQL/MariaDB
I’ve changed the password to just [A-Z][a-z] characters but no success. ./validate connects without problems; poller-wrapper.py does not. /var/log/mysql/error.log:
2020-05-20 17:25:34 5282 [Warning] Access denied for user 'librenms'@'localhost' (using password: YES)
For quick fix, configure to use socket, but something happens there as adding ::1 (with the same password, of course) should have fixed it, or at least moving to 127.0.0.1.
i have same issue and this my solution,
first, change the host of the DB_USERNAME to 127.0.0.1 on mysql.user then also update librenms database user privileges from @‘localhost’ to @‘127.0.0.1’
after all changes DB_HOST on .env and config.php
i don’t know why poller-wrapper of the new version librenms can’t read the @‘localhost’ but validate.php can.