Hello, I have several wordpress sites that have been working great on Digital Ocean up until today.
Now, all sites hosted on Digital Ocean are running into “Error Establishing a Database Connection”. (Similar sites I have not using Digital Ocean are just fine.)
When I reboot my droplet, I can connect and do anything I want on the sites for around 30 seconds - and then the database error reappears.
I am using Vesta CP (Vesta Control Panel). At the beginning of this problem I double-checked the username/password etc. for the databases that would also be located in the wp-config.php file. While the sites are down, it also shows “error connecting to localhost”.
Vesta CP also works for around thirty seconds after a quick reboot.
I created a swap file as shown here.
But the problem still persists. Any ideas?
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!