今天有网友反馈打不开网站,提示“连接数据库错误”。首先排查磁盘是否被占满,因为之前出现过磁盘占满连不上数据库的情况,可阅读这次排查不是磁盘空间问题,尝试重启数据库service mysqld restart,出现错误提示:Job for mysqld.service failed because the control process exited with error code。接下来登录数据库也提示错误:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)。网上搜索错误代码,找解决方案,发现都不行,于是请教网友大神OneinStack博主。简单询问了几句,排除空间满,查看/data/mysql/mysql-error.log圈出了下面的几行错误代码:
2022-04-10 09:58:30 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 80579362363 between the checkpoint 80579362363 and the end 80579362304. 2022-04-10 09:58:30 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2022-04-10 09:58:30 [Note] InnoDB: Starting shutdown...