Error Code: 2013. Lost connection to MySQL server during query

后端 未结 29 2104
深忆病人
深忆病人 2020-11-22 16:22

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 als

29条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 16:32

    There seems to be an answer missing here for those using SSH to connect to their MySQL database. You need to check two places not 1 as suggested by other answers:

    Workbench Edit → Preferences → SQL Editor → DBMS

    Workbench Edit → Preferences → SSH → Timeouts

    My default SSH Timeouts were set very low and causing some (but apparently not all) of my timeout issues. After, don't forget to restart MySQL Workbench!

    Last, it may be worth contacting your DB Admin and asking them to increase wait_timeout & interactive_timeout properties in mysql itself via my.conf + mysql restart or doing a global set if restarting mysql is not an option.

    Hope this helps!

提交回复
热议问题