MySQL意外关闭xampp

3

我的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文件,但没有成功。请帮我解决这个问题。

3个回答

5

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

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就可以正常工作了。


因为某种奇怪的原因,这对我也起作用了,谢谢! - leveeee

0

我遇到了同样的问题。

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文件后,它仍然无法正常工作。

因此,我查看了此链接。 释放端口号

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

以管理员身份打开命令提示符

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

netstat -ano

现在找到您的端口号并在查找字符串中使用它。在我的情况下,它是3306。 在cmd提示符中键入“netstat -ano | findstr 3306”并按Enter键。

netstat -ano | findstr 3306

查找3306的监听ID。在我的情况下,5224是我的监听ID。
使用“taskkill /PID 6204 /F”终止该进程ID。

taskkill /PID 5224 /F

enter image description here

成功:PID 5224 的进程已终止。将是输出结果。 重新启动XAMPP服务器。

它奏效了!


-4
[mysql] 点击日志按钮查看错误日志并检查[mysql] Windows事件查看器以获取更多线索。
我们可以使用此信息来帮助您解决问题。
可能性:
配置不正确-尝试恢复一些已知的良好配置
端口被阻止-很多时候是Skype(特别是旧版本的Skype),请尝试更改MySQL端口。

这应该是一条注释,而不是实际答案! - Hussein Al-Mosawi

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接