MySQL非常用错误
MySQL Is Offline
- “dial tcp :: connect: connection refused”
- “dial unix : connect: no such file or directory”
MySQL Goes Away
- “invalid connection”
client与db连接成功后,mysql offline 原因很多,可能有:
- MySQL was stopped manually/automatically
- MySQL crashed
- OS crashed
- Hardware crashed
- Network switch crashed
MySQL Shuts Down
- “Error 1053: Server shutdown in progress”
MySQL 在关闭时返回一个特定的错误代码:1053。 驱动程序不处理它,这意味着它不会将连接标记为无效。使用数据库连接池时,连接不会变为无效,它会在执行sql时才会抛出具体的错误
Connection Is Killed
- “invalid connection”
人为或工具可以终止连接。
无法判断连接是通过KILL终止还是MySQL由于上述其他原因而离线。驱动程序只知道连接已丢失
Query Is Killed
- “Error 1317: Query execution was interrupted”
查询不会恢复,应用程序必须重新执行查询。该错误不会影响事务,因此应用程序不需要回滚。