Hello!
I have a small WordPress blog that I host on DigitalOcean. A few days ago our website became inaccessible with the error message “Error establishing a database connection.”
I took a look at the error log and there’s no indication that it’s a memory issue.
It says:
Server upgrade from ‘80032’ to ‘80033’ started.
And then:
failed with error code = 3664, error message = ‘Failed to delete SDI ‘mysql.tables_priv’ in tablespace ‘mysql’.’
Before it says “failed to upgrade server.”
I followed the guidance found on this subreddit and [elsewhere]).
I first checked the database login credentials in wp-config.php, and the information is seemingly correct. However, when I try to connect to the database via the console, I get the error:
Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
Similarly, when I attempt a database repair and insert
define(‘WP_ALLOW_REPAIR’, true);
into the wp-config file, the database repair page doesn’t appear and I still get the same “Error establishing a database connection” message.
Any tips on where I can look next to help resolve the issue?
[ad_2]
Can you confirm MySQL is running?
The only way I’ve got around this is to restart the digital ocean droplet though my website is pretty static, I’m not sure if I’d do this if I had user data such as on an e-commerce website, I’ve had this happen to me infrequently