我在 XAMPP 中遇到 MySQL 啟動但很快就停止的問題已經很長時間了。由于這個錯誤,我重新安裝了 XAMPP 兩次。上次重新安裝后,我終于希望它現在可以正常工作了。已經工作了大約一周了,今天又出現同樣的錯誤。我現在可以發現通過以管理員權限打開XAMPP并輸入命令mysqld可以自動啟動MySQL--skip-grant-tables在 XAMPP 外殼中。該命令實際上僅停止 phpmyadmin 的表??赡苁潜碇杏绣e誤。然后我將 MySQL 安裝為 Windows 服務以進行測試,并且必須發現 MySQL 可以毫無問題/命令輸入地啟動。但是,如果您想調用 phpmyadmin,則 phpmyadmin 上會出現錯誤消息,并且 MySQL 會自動停止。也許有人有解決問題的辦法?phpmyadmin 錯誤消息:The connection could not be established due to invalid settings. mysqli :: real_connect (): (HY000 / 2002): A connection could not be established because the target computer refused to connect. Connection for the control user, as specified in your configuration, has failed. mysqli :: real_connect (): (HY000 / 2002): A connection could not be established because the target computer refused to connect. phpMyAdmin tried to connect to the MySQL server and the connection was rejected. You should check your host, user name and password settings in your config.inc.php and make sure that they correspond to the information you received from the administrator.
1 回答

阿波羅的戰車
TA貢獻1862條經驗 獲得超6個贊
我想我能找到這個bug。正如我所懷疑的,這可能是由于桌子損壞造成的?,F在再次檢查 XAMPP 錯誤日志,發現以下錯誤。
2020-06-30 16:06:09 0 [ERROR] mysqld.exe: Table '. \ Mysql \ db' is marked as crashed and last (automatic?) Repair failed
2020-06-30 16:06:09 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table '. \ Mysql \ db' is marked as crashed and last (automatic?) Repair failed
2020-06-30 16:06:09 0 [ERROR] aborting
意味著你必須修理桌子。剛剛又檢查了一下。我認為這篇文章可以解決這個問題。
- 1 回答
- 0 關注
- 251 瀏覽
添加回答
舉報
0/150
提交
取消