MAMP PRO for Mac mysql无法启动

18-04-06 17:30 字数 2563 阅读 2561

查看mysql_error.log 如下:

2018-03-21 14:59:06 30264 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_relay_log_info uses space ID: 3 at filepath: ./mysql/slave_relay_log_info.ibd. Cannot open tablespace ecshop/ecs_device which uses space ID: 3 at filepath: ./ecshop/ecs_device.ibd
2018-04-06 14:41:17 53182 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_relay_log_info uses space ID: 3 at filepath: ./mysql/slave_relay_log_info.ibd. Cannot open tablespace ecshop/ecs_device which uses space ID: 3 at filepath: ./ecshop/ecs_device.ibd
2018-04-06 14:41:18 53743 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_relay_log_info uses space ID: 3 at filepath: ./mysql/slave_relay_log_info.ibd. Cannot open tablespace ecshop/ecs_device which uses space ID: 3 at filepath: ./ecshop/ecs_device.ibd
2018-04-06 14:54:52 54670 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_relay_log_info uses space ID: 3 at filepath: ./mysql/slave_relay_log_info.ibd. Cannot open tablespace ecshop/ecs_device which uses space ID: 3 at filepath: ./ecshop/ecs_device.ibd
2018-04-06 14:54:53 55190 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_relay_log_info uses space ID: 3 at filepath: ./mysql/slave_relay_log_info.ibd. Cannot open tablespace ecshop/ecs_device which uses space ID: 3 at filepath: ./ecshop/ecs_device.ibd
2018-04-06 14:54:53 55190 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/slave_master_info uses space ID: 4 at filepath: ./mysql/slave_master_info.ibd. Cannot open tablespace ecshop/ecs_order_review which uses space ID: 4 at filepath: ./ecshop/ecs_order_review.ibd
2018-04-06 14:54:53 55190 [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 ecshop/ecs_push which uses space ID: 5 at filepath: ./ecshop/ecs_push.ibd
2018-04-06 14:54:53 55190 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_index_stats uses space ID: 2 at filepath: ./mysql/innodb_index_stats.ibd. Cannot open tablespace ecshop/ecs_cert which uses space ID: 2 at filepath: ./ecshop/ecs_cert.ibd
2018-04-06 14:54:53 55190 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace mysql/innodb_table_stats uses space ID: 1 at filepath: ./mysql/innodb_table_stats.ibd. Cannot open tablespace ecshop/ecs_config which uses space ID: 1 at filepath: ./ecshop/ecs_config.ibd

解决办法

mamp_mysql.png

打开MAMP PRO,选择菜单栏File->Edit Template->MySQL(my.cnf)->5.6.38,这时打开了一个文本,找到[mysqld]在其下方添加一句:innodb_force_recovery = 1

然后再尝试重启MySQL服务。

0人点赞>
关注 收藏 改进 举报
0 条评论
排序方式 时间 投票
快来抢占一楼吧
请登录后发表评论
站长 @ 十七度
文章
384
粉丝
23
喜欢
195
收藏
31
排名 : 1
访问 : 145.04万
私信