Windows更新之後,如何在XAMPP上啟動MySQL求解錯誤:MUTEXES和RW_LOCKS使用Windows互鎖功能

Windows更新之後,如何在XAMPP上啟動MySQL求解錯誤:MUTEXES和RW_LOCKS使用Windows互鎖功能

如果在自動Windows 10更新後,您的XAMPP突然不想啟動MySQL服務,而它以前工作正常,並且您沒有進行任何更改,那麼本文可能適合您!

不要驚慌,解決方案可能是簡單地更改您的MySQL端口或使用現有備份。

問題:錯誤mutexes和rw_locks使用Windows互鎖功能

如果您在啟動PhpMyAdmin時遇到此錯誤,則意味著您的MySQL服務未在XAMPP應用程序上啟動:

MySQL said: Documentation Cannot connect: invalid settings.
mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it
Connection for controluser as defined in your configuration failed.
mysqli::real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

如果在XAMPP上啟動MySQL時遇到此錯誤,則意味著您的MySQL安裝有問題 - 請參見下面的解決方法:

18:58:08 [mysql] Error: MySQL shutdown unexpectedly.
18:58:08 [mysql] This may be due to a blocked port, missing dependencies,
18:58:08 [mysql] improper privileges, a crash, or a shutdown by another method.
18:58:08 [mysql] Press the Logs button to view error logs and check
18:58:08 [mysql] the Windows Event Viewer for more clues
18:58:08 [mysql] If you need more help, copy and post this
18:58:08 [mysql] entire log window on the forums

診斷並解決XAMPP中的MySQL啟動錯誤

首先,要診斷確切的錯誤,請打開XAMPP控制面板,並在對話框中檢查錯誤。

然後,在MySQL程序行上打開MySQL日誌文件,在日誌按鈕下,查找mysql_error.log文件,然後在記事本應用程序中檢查確切的錯誤。

您必須滾動到文件的底部以找到最新條目,請仔細檢查與最新嘗試在XAMPP中啟動MySQL相對應的時間,並查看錯誤。就我們而言,這是我們遇到的錯誤:

2023-01-12 18:58:06 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2023-01-12 18:58:06 0 [Note] InnoDB: Uses event mutexes
2023-01-12 18:58:06 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-01-12 18:58:06 0 [Note] InnoDB: Number of pools: 1
2023-01-12 18:58:06 0 [Note] InnoDB: Using SSE2 crc32 instructions
2023-01-12 18:58:06 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2023-01-12 18:58:06 0 [Note] InnoDB: Completed initialization of buffer pool
2023-01-12 18:58:06 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2023-01-12 18:58:06 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-01-12 18:58:06 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-01-12 18:58:06 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2023-01-12 18:58:06 0 [Note] InnoDB: Waiting for purge to start
2023-01-12 18:58:06 0 [Note] InnoDB: 10.4.21 started; log sequence number 3993504751; transaction id 13792362
2023-01-12 18:58:06 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2023-01-12 18:58:06 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-01-12 18:58:06 0 [Note] Server socket created on IP: '::'.

沒有顯示真正的錯誤消息,根據您的確切問題,可能有兩種不同的方法來解決此問題。

方法1:嘗試更改MySQL端口

第一個解決方案可能是更改MySQL端口,以防已安裝或啟動新的應用程序,並使用與MySQL完全相同的端口。

為此,只需打開位於XAMPP控制面板上“配置”按鈕下方的My.ini文件。

學習SEO基礎知識:今天註冊!

通過我們易於遵循的基礎課程掌握SEO的基礎知識,可以提高網站的知名度和流量。

開始學習SEO

通過我們易於遵循的基礎課程掌握SEO的基礎知識,可以提高網站的知名度和流量。

在那裡,找到當前端口,通常默認為3306,然後將其更改為另一個值 - 例如3308。

確保更改文件中端口的每個單個事件,這是最小目前兩次,並且最多可以寫入五次。

完成後,保存文件,然後嘗試重新啟動您的MySQL應用程序。如果仍然不起作用,問題可能會有所不同。

方法2:嘗試獲取最新備份

在文件夾XAMPP> MySQL下方,然後在MySQL文件夾中使用,首先,在不是真正的問題的情況下,對數據文件夾進行備份。

然後,打開備份文件夾,選擇除IBDATA1文件以外的所有文件,然後復制它們。

將它們複製在MySQL根文件夾上的數據文件夾下,然後嘗試重新啟動您的MySQL。現在應該工作 - 仔細檢查是否丟失了任何數據,因為Exmaple是否存在數據庫中插入的最新條目。

總之:如何解決mysql錯誤

總而言之,求解MySQL錯誤可能與更改端口或使用備份文件夾中存在的現有備份一樣簡單。

如果這些解決方案仍然不適合您,最好是檢查在線資源,以找到專門針對您特定MySQL問題的解決方案。

在XAMPP中啟動MySQL的錯誤

Yoann Bierling
關於作者 - Yoann Bierling
Yoann Bierling是一家網絡出版和數字諮詢專業人員,通過技術專業知識和創新產生了全球影響。熱衷於賦予個人和組織在數字時代蓬勃發展,他被迫取得出色的成果,並通過創建教育內容來推動成長。

學習SEO基礎知識:今天註冊!

通過我們易於遵循的基礎課程掌握SEO的基礎知識,可以提高網站的知名度和流量。

開始學習SEO

通過我們易於遵循的基礎課程掌握SEO的基礎知識,可以提高網站的知名度和流量。




評論 (0)

發表評論