SQLSTATE[HY000] [1045] Access denied for user (No Password)

SQLSTATE[HY000] [1045] Access denied for user

It does not seem to be passing the password through the database. Says No Password and I need it to pass it through

I have tried editing the .env file and checked the config.php.default. I cannot figure out my issue and why it is not working

You need to give us more details. Where are you getting this error? What does your .env look like? And your config.php? Has it worked before? Is it a new installation?

This is a brand new install. I have tried both NGINX. When accessing the web librenms.mydomain.com, the website says something went wrong and to check the log file. The error above is in the librenms.log file. The config.php file is empty as the instructions tell us to load the web page and copy the content into the config.php, but we cannot get the web page to work. We have verified the .env file has information correctly.

I am trying to do a new installation and I am getting the same error. I am following the install doc by the letter for installing on Ubuntu 22.04 and when the instructions say to open the URL to complete the install, I get the “whoops something went wrong”. The librenms.log file shows the same SQLSTATE[HY000] [1045] Access denied for user ‘librenms’@‘localhost’ (using password: NO) (Connection: mysql, SQL: select * from config where (config_name = snmp.unescape) limit 1) in /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php in librenms.log file. I created another VM using ubuntu 20.04 and followed instructions for installing on 20.04 and I get the same result.
Please advise, I have tried redoing the installing at least 10 times with the same result. I have also tried opening MYSQL using “mysql -u librenms” and I get the same error that librenms access denied (Using password NO). If I run “mysql -u librenms -p”, enter the password, I am able to select the librenms database. Does this help to point to the issue?

I’m also facing the same issue and check the logs and it shows as you are saying.
For more clarification, I’m facing this issue while I tried for pre-install check.
I have tried to access the librenms web using an IP address.
Kindly check the image attached to this message.

I have this issue whether I have configured the /etc/nginx/conf.d/librenms.conf file to use the fqdn or the ip address for the webpage.

Fixed it, goto /opt/librenms folder and rename or delete the .env file. Now when you goto the web page the installer will run. You will probably get an error on the last page saying error unable to write the .env file but if you click retry it works and completes.
Good luck with your install…

As per your guidance, I have tried to find .env file at the /opt/librenms folder but could not find the file.
So, can you please provide me the screenshot of that file.

I use WinSCP and SSH to the device. You can see the .env file there.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.