For the past days I’ve been getting the “Error establishing a database connection” message again on my Website (https://www.unidaystudio.com.br/) and trying to fix based on the answers here, google search and mainly this related DigitalOcean tutorial:
But I haven’t succedded in any of them.
I’ll explain the outputs I had following this tutorial and I think it will be helpful to understand what is going on. Also, I don’t know if that helps, but here is also a console output when I try to connect to the website: http://prntscr.com/v3tdua
sudo netstat -plt
Mysql Server is running: http://prntscr.com/v3t43u
zgrep -a "allocate memory" /var/log/mysql/error.log*
Outputs nothing. Here is an extra
htop screenshot of my server:
RAM Usage is 410M/986M.
Checked and they’re correct: user, db name and password. Here is a screenshot: http://prntscr.com/v3t7r5
I added the following code to
Saved, uploaded and closed, then opened the
.../wp-admin/maint/repair.php URL and got the exact same error:
sudo service mysql stop; sudo service mysql start;
and also using:
systemctl restart mysql
So I’m basically out of ideas because every topic points to the same thing that I’ve already tried and failed.
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 $200 of credit to try our products over 60 days!