Report this

What is the reason for this report?

How can I fix "error establishing database connection" ?

Posted on August 5, 2015

I use 512 ram and have 2 websites on Digital ocean and Here I use Webuzo as my panel. The problem comes when I couldn’t open my two sites on wordpress. Error establishing database connection when I tried to open my sites. Please help me… What should I do?



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.

Thank you Jsamuel, now I get new knowledge…I hope we can share our knowledge each other.

Have you checked the logs for mysql?

Debian/Ubuntu:

# cat /var/log/mysql.err
# cat /var/log/mysql.log

CentOS/Fedora:

# cat /var/log/mysqld.err
# cat /var/log/mysqld.log

FreeBSD:

# cat /var/db/mysql/`hostname`.err

You might want to check /var/log/syslog for “Out of memory” message as described here:

How to Fix WordPress ‘error establishing a database connection’

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.