Database error message on wordpress based website.

June 21, 2016 2.7k views
MySQL WordPress LAMP Stack CMS

My server is a Ubuntu-Lamp 14.04 droplet named economas-droplet-ubuntu. I noticed that sometimes when I tried to access the website it will have a databased errror related message “Error establishing a database connection” I was fixing this issue by power cycling the droplet, but since yesterday this hasn’t worked at all.

Please let me know if you can guide me to find a solution to this problem since I have an important meeting tomorrow.

Thank you,

3 Answers

This is not a digital ocean problem. I would contact a person with knowledge of systems administration.

by Jon Schwenn
WordPress is a popular and powerful CMS (content management system) platform. Its popularity can bring unwanted attention in the form of malicious traffic specially targeted at a WordPress site. There are many instances where a server that has not been protected or optimized could experience issues or errors after receiving a small amount of malicious traffic. This guide will show you how to protect WordPress from XML-RPC attacks on an Ubuntu 14.04 system.

Login to the server and check the following files for errors /var/log/mysql/error.log, /var/log/mysql.log and /var/log/mysql.err to find the root cause of the issue.

You can try running the following command to restart the mysql server manually
sudo service mysql restart, please note that might be a temporary fix as you need to find what causes the mysql server to stop.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!