MAMP Pro无法启动MySQL

时间:2017-05-12 21:14:52

标签: mysql mamp-pro

当我的计算机冻结时我不得不强行关机,从那时起MAMP就无法启动MySql。我尝试从MAMP / DB / mysql中删除日志文件并重新启动MAMP,但它没有用。我也尝试在终端中输入sudo killall -9 mysqld,但没有用。

以下是来自MAMP的错误日志:

2017-05-12 16:05:49 4691 [Note] InnoDB: The log sequence numbers 730255276 and 730255276 in ibdata files do not match the log sequence number 730624549 in the ib_logfiles!2017-05-12 16:05:49 4691 [Note] InnoDB: Database was not shutdown normally!
2017-05-12 16:05:49 4691 [Note] InnoDB: Starting crash recovery.
2017-05-12 16:05:49 4691 [Note] InnoDB: Reading tablespace information from the .ibd files...
2017-05-12 16:05:50 4691 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_worker_info uses space ID: 5 at filepath: ./mysql/slave_worker_info.ibd. Cannot open tablespace wordpress@0020test@0020site/wp_term_taxonomy which uses space ID: 5 at filepath: ./wordpress@0020test@0020site/wp_term_taxonomy.ibd
2017-05-12 16:05:50 7fff7303b000  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 ./wordpress@0020test@0020site/wp_term_taxonomy.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.
170512 16:05:50 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我在 MAMP 时遇到了同样的问题。

为了解决这个问题,我被迫删除导致“Applications / MAMP / db / mysql56 / bib”中的错误的文件,然后重新创建TABLE / BASE。 />

我希望这会有所帮助。