[ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibaredata1

本文解决了在Docker中从5.8版本切换到5.7版本MySQL时遇到的启动错误问题。错误信息为:[ERROR][FATAL]InnoDB:Tableflagsare0inthedatadictionarybuttheflagsinfile./ibdata1are0x4800!原因是数据目录残留旧版本数据,清理后即可正常启动。

docker 安装mysql  出现 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata1 are 0x4800!

 

出现的原因是 一开始我是用了 5.8 ,然后数据目录存了一些数据,我换成5,7的时候 没有把数据删掉,再重新启动的时候,数据目录还是指向原来的数据,版本的数据格式不一样, 清空 数据目录的数据,便可以启动了

iot-database | 2025-07-04T08:35:21.579433Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). iot-database | 2025-07-04T08:35:21.591130Z 0 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata1 are 0x4800! iot-database | 2025-07-04 08:35:21 0x7fb876c66880 InnoDB: Assertion failure in thread 140430243424384 in file ut0ut.cc line 921 iot-database | InnoDB: We intentionally generate a memory trap. iot-database | InnoDB: Submit a detailed bug report to http://bugs.mysql.com. iot-database | InnoDB: If you get repeated assertion failures or crashes, even iot-database | InnoDB: immediately after the mysqld startup, there may be iot-database | InnoDB: corruption in the InnoDB tablespace. Please refer to iot-database | InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html iot-database | InnoDB: about forcing recovery. iot-database | 08:35:21 UTC - mysqld got signal 6 ; iot-database | This could be because you hit a bug. It is also possible that this binary iot-database | or one of the libraries it was linked against is corrupt, improperly built, iot-database | or misconfigured. This error can also be caused by malfunctioning hardware. iot-database | Attempting to collect some information that could help diagnose the problem. iot-database | As this is a crash and something is definitely wrong, the information iot-database | collection process might fail.
最新发布
07-05
2025-06-22T11:00:33.239825Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2025-06-22T11:00:33.239825Z 0 [Note] C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld (mysqld 5.7.11) starting as process 26108 ... 2025-06-22T11:00:33.246823Z 0 [ERROR] Can't open shared library 'C:\web\mysql\lib\plugin\keyring_file.dll' (errno: 126 找不到指定的模块。) 2025-06-22T11:00:33.247825Z 0 [ERROR] Couldn't load plugin named 'keyring_file' with soname 'keyring_file.dll'. 2025-06-22T11:00:33.248825Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2025-06-22T11:00:33.249820Z 0 [Note] InnoDB: Uses event mutexes 2025-06-22T11:00:33.251886Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2025-06-22T11:00:33.252866Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2025-06-22T11:00:33.252866Z 0 [Note] InnoDB: Number of pools: 1 2025-06-22T11:00:33.252866Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2025-06-22T11:00:33.285824Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2025-06-22T11:00:33.289823Z 0 [Note] InnoDB: Completed initialization of buffer pool 2025-06-22T11:00:33.322821Z 0 [Note] InnoDB: Setting log file .\ib_logfile101 size to 48 MB 2025-06-22T11:00:33.342815Z 0 [Note] InnoDB: Setting log file .\ib_logfile1 size to 48 MB 2025-06-22T11:00:33.362882Z 0 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file .\ibdata1 are 0x4800! 2025-06-22 19:00:33 0x65bc InnoDB: Assertion failure in thread 26044 in file ut0ut.cc line 920 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.m
06-23
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值