每当我运行 mysql 服务时,都会出现以下错误。
Job for mysql.service failed because the control process exited with
error code. See "systemctl status mysql.service" and
"journalctl -xe" for details.
当我运行时systemctl status mysql.service
,出现以下错误 -
mysql.service:主进程已退出,代码=已退出,状态=3 / NOTIMPLEMENTED
以下是 Mysql 的错误日志:-
2019-03-17T10:08:15.143769Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-03-17T10:08:19.179052Z 0 [Warning] InnoDB: 1048576 bytes should have been read. Only 147456 bytes read. Retrying for the remaining bytes.
2019-03-17T10:08:23.235026Z 0 [Warning] InnoDB: Retry attempts for reading partial data failed.
2019-03-17T10:08:23.235060Z 0 [ERROR] InnoDB: Tried to read 1048576 bytes at offset 1048576, but was only able to read 147456
2019-03-17T10:08:23.235080Z 0 [ERROR] InnoDB: Operating system error number 5 in a file operation.
2019-03-17T10:08:23.235097Z 0 [ERROR] InnoDB: Error number 5 means 'Input/output error'
2019-03-17T10:08:23.235111Z 0 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2019-03-17T10:08:23.235125Z 0 [ERROR] InnoDB: File (unknown): 'read' returned OS error 105. Cannot continue operation
2019-03-17T10:08:23.235138Z 0 [ERROR] InnoDB: Cannot continue operation.
这是与操作系统相关的问题还是某些 Mysql 文件已损坏?有人能指出实际问题是什么吗?
答案1
不幸的是,这看起来像是 HDD 故障,磁盘 IO 期间出现错误。
现在是时候在第二台服务器上部署数据库备份并将操作迁移到那里,同时解决硬件问题。