問題描述
當我嘗試使用 MySQL Workbench 將索引添加到表時,我收到 錯誤代碼:2013.在查詢期間丟失與 MySQL 服務器的連接錯誤.我還注意到,每當我運行長查詢時它就會出現.
I got the Error Code: 2013. Lost connection to MySQL server during query error when I tried to add an index to a table using MySQL Workbench. I noticed also that it appears whenever I run long query.
是否可以增加超時值?
推薦答案
新版本的 MySQL WorkBench 有一個選項可以更改特定的超時時間.
New versions of MySQL WorkBench have an option to change specific timeouts.
對我來說是在編輯 → 首選項 → SQL 編輯器 → DBMS 連接讀取超時(以秒為單位):600
For me it was under Edit → Preferences → SQL Editor → DBMS connection read time out (in seconds): 600
將值更改為 6000.
Changed the value to 6000.
還有未檢查的限制行,因為每次我想搜索整個數據集時都設置一個限制會讓人厭煩.
Also unchecked limit rows as putting a limit in every time I want to search the whole data set gets tiresome.
這篇關于錯誤代碼:2013.在查詢過程中失去與 MySQL 服務器的連接的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!