MySQL error 2013

后端 未结 7 1278
被撕碎了的回忆
被撕碎了的回忆 2021-02-19 00:50

In MySQL, how can I solve the error below?

2013: Lost connection to MySQL server at \'reading authorization packet\', system error: 0
7条回答
  •  攒了一身酷
    2021-02-19 01:13

    From documentation:

    More rarely, it can happen when the client is attempting the initial connection to the server. In this case, if your connect_timeout value is set to only a few seconds, you may be able to resolve the problem by increasing it to ten seconds, perhaps more if you have a very long distance or slow connection. You can determine whether you are experiencing this more uncommon cause by using SHOW STATUS LIKE 'aborted_connections'. It will increase by one for each initial connection attempt that the server aborts. You may see “reading authorization packet” as part of the error message; if so, that also suggests that this is the solution that you need.

    Try increasing connect_timeout in your my.cnf file

提交回复
热议问题