WordPress: Error Establishing Database

Posted May 17, 2015 2.1k views
Linux BasicsCentOSMySQLMiscellaneousWordPressLAMP StackDigitalOcean

Hi all,

I have a 512MB droplet running CentOS 7 and I’m trying to set up wordpress (I didn’t do the initial 1-click install). Everything is installed (Apache, MariaDB, etc) and everything is configured (I believ) but when I go to my site I get “error establishing database” on the front and back end. I’ve already created a relatively large swap file (4 gigs) but it doesn’t seem to have made a difference. There are no plugins installed. Scouring the internet has yet to help. Any suggestions are greatly appreciated!

(I’m brand new at this, so let me know if I left out any needed information).


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.

Submit an Answer
1 answer

Few things I would like to draw your attention to..

For 512MB RAM, one should chose x32 platform.. As per advice by many, unless you have at-least 2GB or more RAM, OS should be x32..

Hence if possible revert back to CentOS 6.6 x32 or Choose Ubuntu 14 LTS x32..

Regarding swap file, if you search in forum, too much swap would result in MySQL or such crash due to the nature of slow read write of swap file compare to RAM, hence do not create more than 512MB Swap. If you see, your web server is still running our RAM and Swap space, then add more RAM..