Website "Database" error
When I try to go onto my website, whether that be the back or front end, I get this message:
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or that contact with the database server at localhost could not be established. This could mean your host’s database server is down.
The username and password are 100% correct, so has to be the database server.
Is there something I can do easily to fix this, or is it something on the linode end that I have to wait for?
1 Reply
So this is a WordPress site.
Are you taking the error during installation?
What is the URL of the site?
What database are you using… Mysql? Postgre? MariaDB?
If mySQL, have you looked at your wp-config.php file (via SFTP or terminal) to absolutely make sure all four database parameters are correct… user, pass, host, DBname? (Sometimes a space or some garbage can get in one of these important fields.)
Are you sure you are using the user/pass that have full privileges?
Can you get into the database via the SSH/Terminal command line?
Did you try the LAMP test… scroll to bottom of this page, create the PHP file… and run it.
https://www.linode.com/docs/guides/how-to-install-a-lamp-stack-on-ubuntu-20-04/