Question

How to fix "Error establishing a database connection" ?

Posted August 19, 2018 678 views
CentOSDigitalOcean

Can someone help me, this my site: imbest.info
I really don’t know in digitalocean VPS.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Is there someone from digital ocean that will respond here or is it best to move to a server with tech support

This error is usually caused by incorrect username or password. Please make sure that you are supplying the correct credentials when connecting to your MySQL server.

Also, make sure that the user that is trying to access the database is granted the correct permissions using the syntax below:

GRANT ALL ON username.* TO 'db_name'@'localhost' ; 
FLUSH PRIVILEGES;
EXIT;
Submit an Answer