I’ve been hunting and searching as much as possible to try to find a solution to this error. It would seem that mysql crashed and did a recovery, and has somewhere along line been corrupted.
I really can’t afford to lose the date, even if it means manually extracting the tables
The error I’m getting is this on the frontend Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /var/www/html/wp-includes/wp-db.php on line 1626
Changing localhost to 127.0.0.1 in the config
Restarting and starting mysql - it gives me the error ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
A sysadmin friend tried restoring the InnoDB but no luck. This was in the logs: InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery.
Any advice or suggestions is greatly appreciated.
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.