Report this

What is the reason for this report?

Database Error in my website help me resolve that?

Posted on June 14, 2016

I have my website hosted on digitalocean per day this error happens error establishing database connection when i switch server off and again on error goes off is there any permanent solution say me please



This textbox defaults to using Markdown to format your answer.

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

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.

Hi shyamsundarn,

Can you give us a bit more information here? Specifically:

  1. Size of the droplet
  2. The output of your mysql logs and/or output of dmesg & /var/log/messages

From here, we can hopefully help narrow down the issue. It could be that mysql is crashing/being killed off by OOMkiller, but without that information, it’ll be difficult to answer why this is happening.

As a sidenote, rather than going through the trouble of restarting the droplet, you may want to see if mysql is running:

service mysql status

And/or

netstat -ntlp | grep :3306

If it’s not, you should just be able to start it back up using

service mysql start

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.