Report this

What is the reason for this report?

can't resolve error establishing database connection

Posted on August 3, 2020

I get this error at least twice a week on my wordpress website. I confirmed an attack with ‘‘grep xmlrpc /var/log/apache2/access.log’’ I enabled ‘‘sudo a2enconf block-xmlrpc’’

And, I even also set up a plugin called Stop XML-RPC Attacks. It was worse in the past but I still get this error, how can I stop it?

For example, I got this error today and I typed ‘‘grep xmlrpc /var/log/apache2/access.log’’ and got nothing.



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.

Hello,

Request you to refer to below link, which guides you on how to troubleshoot the Database connection error:

https://www.digitalocean.com/community/tutorials/how-to-debug-the-wordpress-error-establishing-database-connection

Cheers, Sri Charan

Hi @rem3n,

What you can do is actually block access to XMRPC.php file and allow access only to needed IP addresses.

Additionally, you can try and configure fail2ban. It should be able to help incase someone is doing a DDoS.

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.