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

后端 未结 29 1902
深忆病人
深忆病人 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:26

    If your query has blob data, this issue can be fixed by applying a my.ini change as proposed in this answer:

    [mysqld]
    max_allowed_packet=16M
    

    By default, this will be 1M (the allowed maximum value is 1024M). If the supplied value is not a multiple of 1024K, it will automatically be rounded to the nearest multiple of 1024K.

    While the referenced thread is about the MySQL error 2006, setting the max_allowed_packet from 1M to 16M did fix the 2013 error that showed up for me when running a long query.

    For WAMP users: you'll find the flag in the [wampmysqld] section.

提交回复
热议问题