問題描述
當(dāng)我嘗試使用 MySQL Workbench 將索引添加到表時(shí),我收到 錯誤代碼:2013.在查詢期間丟失與 MySQL 服務(wù)器的連接錯誤.我還注意到,每當(dāng)我運(yùn)行長查詢時(shí)它就會出現(xiàn).
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.
是否可以增加超時(shí)值?
推薦答案
新版本的 MySQL WorkBench 有一個選項(xiàng)可以更改特定的超時(shí)時(shí)間.
New versions of MySQL WorkBench have an option to change specific timeouts.
對我來說是在編輯 → 首選項(xiàng) → SQL 編輯器 → DBMS 連接讀取超時(shí)(以秒為單位):600
For me it was under Edit → Preferences → SQL Editor → DBMS connection read time out (in seconds): 600
將值更改為 6000.
Changed the value to 6000.
還有未檢查的限制行,因?yàn)槊看挝蚁胨阉髡麄€數(shù)據(jù)集時(shí)都設(shè)置一個限制會讓人厭煩.
Also unchecked limit rows as putting a limit in every time I want to search the whole data set gets tiresome.
這篇關(guān)于錯誤代碼:2013.在查詢過程中失去與 MySQL 服務(wù)器的連接的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!