After a power faliur (also can be a sudden restart or system crash), I ended up with corrupted database and lost the access to my local hosted websites for development. Even the MAMP's MySQL server was not starting.
You will need to find the databases folders, in case of MAMP they are located in Applications/MAMP/db/mysql56
(or mysql57
depending on MySQL version).
You will find folders containing the database name, inside them you will find .frm
and .ibd
files. Take a copy of the entire folder for backup in another place, the desktop for example.