Mac下MAMP起動MySQLエラー

1323 ワード

Mac下MAMP起動MySQLエラー
使用するのはMAMPの集積環境で、コンピュータがハングアップするため正常にMAMPを閉じていないで、再び起動した後にMySQLは起動することができないことを発見して、ログを見ます
InnoDB: If you are installing InnoDB, remember that you must create      
InnoDB: directories yourself, InnoDB does not create them.  
InnoDB: Error: could not open single-table tablespace file ./test/xhphp.ibd  
InnoDB: We do not continue the crash recovery, because the table may become  
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.  
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
G検索では、多くの人がMAMP/db/mysql56/ディレクトリの下のib_logfile0ib_logfile1を削除すると言っていますが、私はパスに基づいて中に入ってみると、この2つのファイルがなくて、最終的に正しいパス/Library/Application Support/appsolute/MAMP PRO/db/mysql56を見つけました.これこそ正しいディレクトリです.このディレクトリの下にはその2つのファイルがあります.削除した後、MySQLを再開して、完成しました.