5

MySQL报错 Can't find record in xxx

 1 year ago
source link: https://abcdxyzk.github.io/blog/2023/01/30/mysql-repair/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

MySQL报错 Can't find record in xxx

2023-01-30 12:16:00

UNIQUE KEY 备份还原时报错?

Mysql ERROR 1032 (HY000): Can’t find record in xxx

先删除 UNIQUE KEY 还原后载加回来

alter table ipscan add UNIQUE KEY `ip` (`ldate`,`ip`,`proto`,`port`,`from`) USING HASH;

https://blog.csdn.net/yangshuainan/article/details/122037791

备份后,还原时出现 Mysql ERROR 1032 (HY000): Can’t find record in xxx,排查数据后并没有发现什么问题。

百度查到文章:MySQL: Can’t find record in tablename - Database Administrators Stack Exchange

20230130-10.png
REPAIR TABLE xxx USE_FRM

修复后问题解决。

修复前请记得备份要修复的表防止数据丢失,切记!!。


MySQL数据库中 .frm 和 .myi 和 .myd 和 .ibd 文件是什么文件?

存储引擎是myisam

在data目录下会看到3类文件:.frm、.myi、.myd

(1).frm–表定义,是描述表结构的文件。

(2).MYD–"D"数据信息文件,是表的数据文件。

(3).MYI–"I"索引信息文件,是表数据文件中任何索引的数据树

存储引擎是InnoDB

在data目录下会看到2类文件:.frm、.ibd

(1).frm–表结构的文件。

(2).ibd–表数据和索引的文件。该表的索引(B+树)的每个非叶子节点存储索引,叶子节点存储索引和索引对应的数据。

Posted by kk

2023-01-30 12:16:00tools, mysql

« Base64编码知识详解

wx_ok.pngali_ok.png

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK