MySQL錯誤Forcing close of thread的兩種解決方案_Mysql

來源:互聯網
上載者:User

最近網站訪問量大增,可能有些頻道程式也有一些問題,造成了MySQL資料庫出現Forcing close of thread 28790 user錯誤。如果遇到這種情況改怎麼解決呢?icech找到兩種方法來解決:

1、修改mysql設定檔

如果設定檔是my.ini,可以在在my.ini添加下面兩條內容:

skip-locking
skip-name-resolve

注意:在新版本的mysql中,skip-locking已經被換成了skip-external-locking,如果使用skip-locking,可能會報如下錯誤:

[Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.

要注意查看日誌。所以新版本mysql的寫法應該是:

skip-external-locking
skip-name-resolve

2、在mysql服務中進行設定

開始菜單 -> 運行 -> services.msc,找到mysql的服務並雙擊,點擊復原選項卡。

第一次失敗:預設是“不操作”,改成"重新啟動服務"。

在下方的“重新啟動服務:()分鐘後”添上“0”表示如果服務意外終止則立即重啟動。

點擊確定使設定生效。

但是有個問題產生了:如果這樣進行修改,在工作管理員裡無法結束mysql-nt進程。所有如果需要停止進程,先改回來再操作即可。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.