Question

Error Establishing Database Connection

Posted June 25, 2016 1.6k views
WordPress

Hello i am using $10 plan i run one website only on that but once a day this error happens error establishing database connection can you solve it

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

Hi there, I noticed when I first started that my MySQL process kept crashing, causing the same issue. The fix was to manually restart it every time that happened.

sudo service mysql restart

You may want to look into creating a swap file for your server, to fix that issue in the long run.

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

by Justin Ellingwood
Swap space can be used as an "overflow" area for your system when you run out of RAM. The operating system can store data that would normally be kept in RAM on the hard drive in a specially formatted file. In this guide, we'll demonstrate how to create and use one of these files in Ubuntu 14.04.
Submit an Answer