XAMPP 完全無法啟動,而且PORT沒有被佔用權限表損毀。
錯誤訊息:
上午 10:14:09 [mysql] Status change detected: stopped
上午 10:14:09 [mysql] Error: MySQL shutdown unexpectedly.
上午 10:14:09 [mysql] This may be due to a blocked port, missing dependencies,
上午 10:14:09 [mysql] improper privileges, a crash, or a shutdown by another method.
上午 10:14:09 [mysql] Press the Logs button to view error logs and check
上午 10:14:09 [mysql] the Windows Event Viewer for more clues
上午 10:14:09 [mysql] If you need more help, copy and post this
上午 10:14:09 [mysql] entire log window on the forums
解決辦法:
1.緊急模式啟動(修復權限表)MYSQL:
mysqld --defaults-file="D:/tools/xampp/mysql/bin/my.ini" --skip-grant-tables --console
2.新開一個命令提示符窗口,登錄 MySQL:
mysql -u root
3.執行修復命令:
USE mysql;
REPAIR TABLE db;
如果看到以下結果Msg_text 是 OK,代表修復成功!
+--------+----------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+--------+----------+----------+----------+
| mysql.db | repair | status | OK |
+--------+----------+----------+----------+
相關網址:
https://chatgpt.com/c/68142bfc-2898-8001-8f3e-3d3ce5728083
https://chat.deepseek.com/a/chat/s/8e6ee391-79e6-463f-a28c-16d6051da98c