mysqld收到信号6

ogsagwnx  于 2021-06-20  发布在  Mysql
关注(0)|答案(2)|浏览(402)

我使用的是MySQL5.7.23版本,无法启动mysql服务器。 [ERROR] InnoDB: Space id and page no stored in the page, read in are [page id: space=3376699519, page number=1484718080], should be [page id: space=1463, page number=1] 2018-10-04T04:29:19.269829Z 0 [ERROR] InnoDB: Page [page id: space=3376699519, page number=1484718080] log sequence number 17294104044079415296 is in the future! Current system log sequence number 189601148. 2018-10-04T04:29:19.269834Z 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery. 2018-10-04T04:29:19.269872Z 0 [ERROR] InnoDB: Database page corruption on disk or a failed file read of page [page id: space=1463, page number=1]. You may have to recover from a backup.

cotxawn7

cotxawn71#

请检查innodb\u force\u recovery,将其设置为1,然后启动mysql。欲知详情,请阅读此文

5rgfhyps

5rgfhyps2#

此错误表示数据库数据已损坏。您可以尝试在恢复模式下启动mysql示例,如果您幸运的话,您将能够进行备份。取决于所选模式表可能是只读的
警告:在恢复模式下启动服务之前备份数据文件
要在恢复模式下启动mysql,请添加 --innodb_force_recovery=<mode> 在mysql启动参数中
mysql支持值来自 06 mysql恢复文档
docker compose文件示例:

version: '2'
services:
  myservice-mysql:
    image: mysql:8.0.17
    volumes:
      - ~/volumes/MyProject/mysql/:/var/lib/mysql/
    environment:
      - MYSQL_USER=root
      - MYSQL_ALLOW_EMPTY_PASSWORD=yes
      - MYSQL_DATABASE=MyProject
    ports:
      - 3306:3306
    command: mysqld --innodb_force_recovery=6 --lower_case_table_names=1 --skip-ssl --character_set_server=utf8mb4 --explicit_defaults_for_timestamp

如果mysql启动成功,你可以使用任何工具来做转储,你可以恢复新的未损坏的mysql示例

相关问题