2017-01-11 14 views
1

問題を解決できません。このエラーが発生しますMAMP Pro mysqlが起動できません

2017-01-11 23:58:25 7fffbac563c0 InnoDB: Operating system error number 2 in a file operation. 
InnoDB: The error means the system cannot find the path specified. 
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 ./mysql/innodb_index_stats.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 
InnoDB: and force InnoDB to continue crash recovery here. 
170111 23:58:26 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended 

私はこれをどのように修正できますか?

おかげ

答えて

7

あなたは、MySQL my.cnfは、この問題を解決編集することができます。

検索:file -> edit template -> MYsql(my.cnf)

検索:'innodb_force_recovery' = 1

希望あなたを助けるために!

+1

ありがとうございます。あなたはまたなぜそれが起こるか答えることができますか? – fdrv

+0

ここには、これが何をするかに関する詳細があります:https://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html –

関連する問題