MYSQL server has gone away

前端 未结 3 1916
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 04:41

I am using WAMP server for my web application . Sometimes I see this General error: 2006 MySQL server has gone away\'

I am updating the MySQL database through PDO PH

3条回答
  •  时光说笑
    2020-12-12 05:18

    Try to debug the problem. This can be caused by any number of things. Commonly there are:

    • The MySQL server crashed
    • A comms problem between the client and server
    • Abusing the client library in a way not intended, perhaps sending commands out of order or sending junk through the socket.

    Last time I used it the PDO driver was quite flakey and it was possible to create the last case.

    If the comms problem is likely in production, your application should reconnect and retry the transaction.

提交回复
热议问题