Hi Guys, I am facing "Error Establishing a Database Connection" from the last 1.5 month on my website. I didn't get the solution yet. Please Seniors Help me on urgent basis. Thanks in Advance
Hey there! I see your site is based on WordPress, so you'd want to check the username and password that is stored in /home/username/public_html/wp-config.php to ensure that is able to connect to the database on the server.
Hey there! I see your site is based on WordPress, so you'd want to check the username and password that is stored in /home/username/public_html/wp-config.php to ensure that is able to connect to the database on the server.
Are you able to confirm that user can connect on the command line to the database? You would run this command to test it:
Code:
mysql -u database_username -p
Just replace "database_username" with your actual username and it would prompt you with the password. If that connection works, there must be some other issue happening, and you'd want to check the MySQL log on the system to determine the problem.
I found the issue, it seems when I transferred the accounts via the Transfer tool to a new server the privileges were lost for the user to the db. Never had that problem before.
Using latest cPanel and MariaDB 10.5.
@radeonpower - I'm glad you were able to track down the issue. If you migrated from an older version of MySQL or MariaDB it's possible there were issues with the grants, as I've seen that happen before.
That's definitely odd - I would have expected there to have been some type of error listed in the transfer log. If you want us to take a look at the system and see if we can find any details feel free to submit a ticket to our team, and then post the number here.
The system received an error from the “MySQL” database “mysql”: ER_PASSWORD_NO_MATCH (Can't find any matching row in the user table)",null],[["MysqlBase","_do_cpanel_mysql_with_newuser_privs",602],"The system failed to grant privileges on the database “website1_wp340” to the user “website1_wp340” because of an error: (XID bkfm83)