By shyamsundarn
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!
Hi shyamsundarn,
Can you give us a bit more information here? Specifically:
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.