SQLSTATE[HY000] [1045] Access denied & SQLSTATE[HY000] [2002] A connection attempt failed

I have repeatedly changed the database password, and also changed the host connection.
first test:
file .env

DB_CONNECTION=mysql
DB_HOST=sql103.byetcluster.com
DB_PORT=3306
DB_DATABASE=epiz_25316827_sd_website
DB_USERNAME=_____user
DB_PASSWORD=_____pass

error message:
“SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed”

second test:
file .env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=epiz_25316827_sd_website
DB_USERNAME=_______user
DB_PASSWORD=_______pass

error message:
“SQLSTATE[HY000] [1045] Access denied for user ‘epiz_25316827’@‘localhost’ (using password: YES)”

Have you tried later? According to the error, the server didn’t respond or the connection failed.

For starters, since you’re probably using Laravel,. please make sure to use our .htaccess snippet to make Laravel work rather than butchering the framework. Because it’s very easy to introduce security issues that way.

Secondly, can you share the URL of your website so we can check?

2 Likes

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