我无法在MAMP上运行MySQL。本网站上的其他文档建议将其全部删除并重新安装MAMP。我当时正处于WordPress主题开发项目的中间,并且已经为它构建了数据库,所以这对我来说不是一个选择。这是错误日志:
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.
170225 17:42:34 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
我真的不知道这告诉我什么。目前没有正在运行的MySQL进程,至少这是我从中收集到的:
danales-MacBook-Pro:~ danale$ killall -9 mysqld
No matching processes belonging to you were found
我使用的是MacBook Pro Sierra。请帮忙。
答案 0 :(得分:1)
删除mysql目录中的所有文件(但不是目录):rm /Applications/MAMP/db/mysql/
文件可能导致问题,我建议在执行此操作之前将其复制到某处。