Error establishing database connection (WordPress)
So I am getting this error while accessing my WordPress site. I mitigated XMLRPC attack and added swap file but to no avail.
While trying to connect to DB using 'mysqladmin -u root -p status' command, I am getting below error.
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Can anyone please help me troubleshoot this? I am on 512 MB droplet.