Getting this error (error establishing database connection)!! Help needed please!!

Hello guys!

I am totally new to this hosting world and especially controlling your host throw command line! I have chosen digital ocean after a long search and it suited my budget and performance-wise as well

my problem is I am having this issue while trying to load my website and getting this error (error establishing database connection).

I have tried this solution putting this line on my

define('WP_ALLOW_REPAIR', true);

on my wp-config.php file throw command line and got to to see if there are any issue or not and all were fine!

What’s wrong then? I have seen another article quite a long time back on Digital ocean people talking about having this issue randomly on their droplets!

I am seriously thinking about changing and migrating to another hosting

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

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.

Hellooo guys it is been like 2 weeks and no answer!!


Any help!!