本地启用XAMPP – MySQL shutdown unexpectedly问题解决

来源:互联网 发布:虚拟打印机端口删除 编辑:程序博客网 时间:2024/06/05 08:21

今天使用xampp的时候,mysql关闭之后突然无法启动,报错为:

15:30:15  [mysql]         Error: MySQL shutdown unexpectedly.
15:30:15  [mysql] This may be due to a blocked port, missing dependencies, 
15:30:15  [mysql] improper privileges, a crash, or a shutdown by another method.
15:30:15  [mysql] Press the Logs button to view error logs and check
15:30:15  [mysql] the Windows Event Viewer for more clues
15:30:15  [mysql] If you need more help, copy and post this
15:30:15  [mysql] entire log window on the forums

上网搜了一下,都说要把xampp\mysql\data下的ibdata1文件删掉,于是我也乐呵乐呵地把ibdata1删了。

删了之后果然启动成功,可是进myadmin一看......数据表全不见。并且以后每次启动mysql都要做这样的删除操作。

果断上网再查,发现一个一劳永逸又不影响数据的方法:

在mysql/bin/my.ini 文件 加一个:
[mysqld]
innodb_force_recovery = 4

这样就OK了。


0 0
原创粉丝点击