php MySQL意外关闭xampp

y1aodyip  于 2023-05-05  发布在  PHP
关注(0)|答案(3)|浏览(144)

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

ig9co6j1

ig9co6j11#

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

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服务
1.从xampp\mysql\backup复制所有文件,并将所有文件粘贴到xampp\mysql\data中。
1.启动Apache
MySQL工作得很好。

4nkexdtk

4nkexdtk2#

我也面临着同样的问题。

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中或删除ibdata 1文件后,它也不起作用。
所以,我通过这个链接。释放端口号

在xampp控制面板中停止Apache模块。
打开命令提示符,以管理员身份运行

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

netstat -ano

现在找到您的端口号并在查找字符串中使用它。我的是3306。键入“netstat -ano|findstr 3306”,然后按回车。

netstat -ano | findstr 3306

找到3306的监听id。第5224章是我的监听ID
使用“taskkill /PID 6204 /F”终止该进程ID。

taskkill /PID 5224 /F

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

而且成功了!

ybzsozfc

ybzsozfc3#

[mysql]按Logs按钮查看错误日志并检查
[mysql] Windows事件查看器以获取更多线索
我们可以用这些信息来帮助你。
可能性:
不正确的配置-尝试恢复一些已知的良好配置
阻塞的端口-通常是skype(尤其是旧版本的skype),请尝试更改MySQL端口

相关问题