MySQL 意外关机 xampp

MySQL shutdown unexpectedly xampp

我的 Apache 运行 正常,但 mysql 服务器显示此错误

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

我尝试删除 ibdata1、ib_logfile0、ib_logfile1、ib_logfile101 个文件,但没有成功。帮我解决这个问题。

[mysql] Press the Logs button to view error logs and check
[mysql] the Windows Event Viewer for more clues

我们可以使用这些信息来帮助您。

可能性:
incorect config - 尝试恢复一些已知的良好配置
阻塞端口 - 通常是它的 skype(尤其是旧版本的 skype),尝试更改 MySQL 端口

我今天遇到了同样的问题。

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

解决方案:

  1. 停止 Apache 服务,然后

  2. 从 xampp\mysql\backup 复制所有文件,并将所有文件粘贴到 xampp\mysql\data。

  3. 启动 Apache

...并且 MySQL 运行良好。

我遇到了同样的问题。

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

但是即使从 xampp\mysql\backup 复制所有文件并将它们粘贴到 xampp\mysql\data 或者当我删除 ibdata1 文件后它也没有用。

所以,我经历了这个 link。 Free the port number

在 xampp 控制面板中停止 Apache 模块。

打开命令提示符并运行作为管理员

在命令提示符下输入“netstat -ano”。这将显示您网络中的所有端口连接。

netstat -ano

现在找到您的端口号并在查找字符串中使用它。就我而言,它是 3306。 输入“netstat -ano | findstr 3306” 在 cmd 提示符下回车。

netstat -ano | findstr 3306

找到3306的监听id,我这里5224就是我的监听id。
使用“taskkill /PID 6204 /F”杀死该进程 ID。

taskkill /PID 5224 /F

SUCCESS:PID 为 5224 的进程已终止。 将是输出。 重新启动 xampp 服务器。

成功了!