【问题标题】:MySQL service won't start anymore because of OS error 105由于操作系统错误 105,MySQL 服务将不再启动
【发布时间】:2021-05-13 13:08:45
【问题描述】:

完整的 MySQL 错误日志:https://pastebin.com/20QX1ZSc

一夜之间我的 MySQL 安装突然停止工作...... 我正在使用 ubuntu 20.04

systemctl:

● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-05-13 14:50:18 CEST; 17min ago
    Process: 4562 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 4570 ExecStart=/usr/sbin/mysqld (code=exited, status=3)
   Main PID: 4570 (code=exited, status=3)
     Status: "Server startup in progress"

May 13 14:50:18 vault systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
May 13 14:50:18 vault systemd[1]: Stopped MySQL Community Server.
May 13 14:50:18 vault systemd[1]: mysql.service: Start request repeated too quickly.
May 13 14:50:18 vault systemd[1]: mysql.service: Failed with result 'exit-code'.
May 13 14:50:18 vault systemd[1]: Failed to start MySQL Community Server.

/var/log/mysql:

2021-05-13T12:50:18.017977Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25-0ubuntu0.20.04.1) starting as process 4570
2021-05-13T12:50:18.032753Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-05-13T12:50:18.194467Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-05-13T12:50:18.428966Z 1 [Warning] [MY-012637] [InnoDB] 16384 bytes should have been read. Only 12288 bytes read. Retrying for the remaining bytes.
2021-05-13T12:50:18.604489Z 1 [Warning] [MY-012638] [InnoDB] Retry attempts for reading partial data failed.
2021-05-13T12:50:18.604910Z 1 [ERROR] [MY-012642] [InnoDB] Tried to read 16384 bytes at offset 16498688, but was only able to read 12288
2021-05-13T12:50:18.605273Z 1 [ERROR] [MY-012592] [InnoDB] Operating system error number 5 in a file operation.
2021-05-13T12:50:18.605645Z 1 [ERROR] [MY-012596] [InnoDB] Error number 5 means 'Input/output error'
2021-05-13T12:50:18.606374Z 1 [ERROR] [MY-012646] [InnoDB] File mysql.ibd: 'read' returned OS error 105. Cannot continue operation
2021-05-13T12:50:18.606762Z 1 [ERROR] [MY-012981] [InnoDB] Cannot continue operation.

【问题讨论】:

    标签: mysql linux ubuntu


    【解决方案1】:

    看起来像数据/文件损坏。请尝试以下步骤:

    1. 删除 --> /etc/mysql/conf.d/mysqld_safe_syslog.cnf 下的 syslog 条目
    2. 备份并删除 --> /var/lib/mysql 下的 ib_logfile0 和 ib_logfile1 文件
    3. 从 --> etc/mysql/my.cnf 中删除条目 innodb_force_recovery = 1
    4. 运行命令 --> sudo service mysql start

    参考Forcing InnoDB Recovery

    【讨论】:

      猜你喜欢
      • 2021-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多