MySQL日志提示[ERROR] InnoDB: Attempted to open a previously opened tablespace.的解决办法

今天一个服务器上网站打不开,数据库链不上

查看MySQL日志发现以下错误

[ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace newfish/cd_banner uses space ID: 97 at filepath: ./newfish/cd_banner.ibd. Cannot open tablespace d7www_cn/cd_banner which uses space ID: 97 at filepath: ./d7www_cn/cd_banner.ibd

解决办法:

在my.ini中添加一行代码即可,具体代码为:

innodb_force_recovery = 1

然后保存,重新启动

问题完美解决