Mysql database unaccessible since a crash

Hi There

I run on Local by Flywheel several sites and this morning my Mac crashed suddendly.
After the restart for 1 of my sites I can’t anymore have access to it due to a MySQL error.
When I start the site all is OK BUT when I close it I get an error message saying that the backup failed due to MySQL missing…
And when I run Admin button for the site I get an error
I restart several times Local by Flywheel in case of but no change this particular site is down the others work well.
Any clue how to resolve this please?
I join the error logs of MySQL to help

error.log (78.0 KB)

Your log says MySQL wasn’t shutdown properly as you stated, and hogs on the InnoDB setup, it also gives a URL for forcing InnoDB (the engine you are using) to recover.

This link tells you to insert this code into you .cnf file before restarting MySQL:

innodb_force_recovery = 1

DISCLAIMER: Be aware that this is a possible destructive action, so do backup your database/website before doing it and proceed on your own will.

So you go to your “Local Sites” folder: Local Sites > *NAME OF WEBSITE* > conf > mysql > my.cnf and open that file in a text editor of your choice.
Find the line on the file that has the “[mysqld]” text and insert the rest of the code below it.

After that, restart the site on Local (if should restart MySQL as well and force the recovery).
Also, I say here that I never did this myself, but as explained on the link reference, it’s pretty straight forward.

If this doesn’t solve your problem, the my.cnf can be the wrong file that MySQL loads or the damage on the database might be really irreversible. If that’s the case, you might have to stick to a backup :confused:

Surges of energy, sudden shutdowns and general crashes on computers tend to cause this since processes are not closed gracefully. I advise you to always make backups to get around those types of problem, they sometimes happen, and backups are your insurance of not losing work…