实例正常,page页损坏处理

1、select count(*) from XXXXX_homework; 可以查询

2、check table XXXXX_homework; 有报错,报连接失败。

ERROR 2013 (HY000): Lost connection to MySQL server during query

3、xtrbackup 备份报错。

[03] xtrabackup: Database page corruption detected at page 3881048, retrying...
[03] xtrabackup: Error: failed to read page after 10 retries. File ./XXXXX/XXXXX_homework.ibd seems to be corrupted.
[03] xtrabackup: Error: xtrabackup_copy_datafile() failed.
[03] xtrabackup: Error: failed to copy datafile.

 

4、修复:错误日志无报错,实例能启动。 用不到innodb_force_recovery=1-6;

create table XXXXX_homework_new20220325;

insert into XXXXX_homework_new20220325 select * from XXXXX_homework;

mysql> insert into XXXXX_homework_new20220325 select * from XXXXX_homework;
ERROR 2013 (HY000): Lost connection to MySQL server during query

 

5、二级索引页损坏,optimize table xxx;

ERROR 2013 (HY000): Lost connection to MySQL server during query

 

6、mysqldump 备份失败。
mysqldump -udball -p -S /tmp/mysqld.3307_XXXXX.sock --skip-opt --create-options --add-drop-table --set-charset --single-transaction -q -e --master-data=2 --triggers -R -E
--hex-blob XXXXX XXXXX_homework >XXXXX_homework20220325.sql
mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `XXXXX_homework` at row: 28150909
提示了哪一行报的错。at row: 28150909

7、select * from XXXXX_homework into outfile '/data/mysql_3307_XXXXX/XXXXX_homework20220325_new.txt' fields terminated by '\t' lines terminated by '\r\n';
导出试试。

posted on 2022-03-25 19:09  星期六男爵  阅读(397)  评论(0编辑  收藏  举报

导航