我在 XAMPP 中遇到 MySQL 啟動(dòng)但很快就停止的問題已經(jīng)很長(zhǎng)時(shí)間了。由于這個(gè)錯(cuò)誤,我重新安裝了 XAMPP 兩次。上次重新安裝后,我終于希望它現(xiàn)在可以正常工作了。已經(jīng)工作了大約一周了,今天又出現(xiàn)同樣的錯(cuò)誤。我現(xiàn)在可以發(fā)現(xiàn)通過以管理員權(quán)限打開XAMPP并輸入命令mysqld可以自動(dòng)啟動(dòng)MySQL--skip-grant-tables在 XAMPP 外殼中。該命令實(shí)際上僅停止 phpmyadmin 的表??赡苁潜碇杏绣e(cuò)誤。然后我將 MySQL 安裝為 Windows 服務(wù)以進(jìn)行測(cè)試,并且必須發(fā)現(xiàn) MySQL 可以毫無問題/命令輸入地啟動(dòng)。但是,如果您想調(diào)用 phpmyadmin,則 phpmyadmin 上會(huì)出現(xiàn)錯(cuò)誤消息,并且 MySQL 會(huì)自動(dòng)停止。也許有人有解決問題的辦法?phpmyadmin 錯(cuò)誤消息: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 回答

阿波羅的戰(zhàn)車
TA貢獻(xiàn)1862條經(jīng)驗(yàn) 獲得超6個(gè)贊
我想我能找到這個(gè)bug。正如我所懷疑的,這可能是由于桌子損壞造成的?,F(xiàn)在再次檢查 XAMPP 錯(cuò)誤日志,發(fā)現(xiàn)以下錯(cuò)誤。
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
意味著你必須修理桌子。剛剛又檢查了一下。我認(rèn)為這篇文章可以解決這個(gè)問題。
- 1 回答
- 0 關(guān)注
- 261 瀏覽
添加回答
舉報(bào)
0/150
提交
取消