XAMPP打开MySql出现错误
异常提示:
Error: MySQL shutdown unexpectedly.
10:06:33 [mysql] This may be due to a blocked port, missing dependencies,
10:06:33 [mysql] improper privileges, a crash, or a shutdown by another method.
10:06:33 [mysql] Press the Logs button to view error logs and check
10:06:33 [mysql] the Windows Event Viewer for more clues
10:06:33 [mysql] If you need more help, copy and post this
10:06:33 [mysql] entire log window on the forums
在网上看到的解决方案:
1、删除XAMPP->mysql->data->里面的ib_logfile1,然后重启xampp。
2、在my.ini里面的[mysqld]下面增加innodb_force_recovery = 4
都没能解决这个问题。
后面发现我的XAMPP是安装在F:\Program Files\xampp下的,但是我看了my.ini里面的路径,和我的安装路径对不上
解决方案: 把XAMPP卸载了,重新安装在根目录下,就能成功运行。