XAMPP运行MySQL entire log window on the forums解决方案

时间:2022-10-26 08:01:06
(此篇为win8环境)

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

贴一个*社区关于这个问题的众多解决方案:

当初也是试了好多种办法,下面一种应该有适合你的:
1、 关闭Xampp
  打开 C:\xampp\mysql\data  
  删除 ibdata1 文件
  重新启动xampp
 
2、点击XAMPP中MySQL一栏的Config下的my.ini
  ctrl+f搜索 [ mysqld ],在这一句的下一行添加:
 [mysqld]
 innodb_force_recovery = 4

3、(1的升级版)
  打开C:\xampp\ mysql\ data\ directory
  删除 ibdata1 & ib_logfile *(比如 ib_logfile0 , ib_logfile1 , ib_logfile101 )  
  重新启动 xampp

4、XAMPP的MySQL的3306端口被占用
(同样适用于Apached的80或者433端口被占用,此处贴一个Apache端口占用的详细解析: http://blog.csdn.net/speedwaycl/article/details/49023223
查看方法一:win+R输入cmd 运行“命令提示符”窗口,输入netstat -ano
XAMPP运行MySQL entire log window on the forums解决方案XAMPP运行MySQL entire log window on the forums解决方案
查看方法二:在XAMPP面板找到Netstat按钮,点击
XAMPP运行MySQL entire log window on the forums解决方案XAMPP运行MySQL entire log window on the forums解决方案
然后查看本机地址的3306端口被哪个程序占用(记住PID)
然后ctrl+alt+delete选择打开任务管理器,在详细信息里将占用端口对应PID号的进程结束:
XAMPP运行MySQL entire log window on the forums解决方案XAMPP运行MySQL entire log window on the forums解决方案