I dont know what to do. I can see my website www.willtek.com.mx and my Bases de datos MySQL® is ok. What do I have to do to fix this.
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hi @etikparati,
When you get Error Establishing Database connection, there are two things that could actually cause it, well more than 2 but if your MySQL is on a local environment then are 2.
MySQL Service
It’s possible your MySQL service to have gone down/be killed by your server due to RAM being insufficient but I’m going ahead of myself.
To check if your MySQL service is down, ssh to your droplet
Once you are in, type in one of the following 3 (If any of them fail, try with the next one)
There are 3 different commands as there is no way for me which exactly you have installed on your droplet. Anyway, if any of them display the service is not running, just type in
Please note, you’ll need to use the exact service.
Now your MySQL should be working as well as your website. You’ll need to troubleshoot why your service was down though.
Wrong Configuration
It’s possible your website to be experiencing issues if something in the configuration file has changed. If you have made any changes, I’ll recommend reverting them back.
Another solution would be to check the configuration file of your website and replace the database information with the one you have so it’s up to date and correct.
Remote MySQL
If your MySQL service is on a remote server, It’s possible your connection was blocked by the server.
You can allow connections from an IP on port 3306 by doing so
You’ll need to replace XXX.XXX.XXX.XXX with your actual IP address.
If this doesn’t help, the First two reasons I mentioned can be applied even if your MySQL droplet is a remote one.
Regards, KDSys