温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

MySQL启动报错InnoDB: The innodb_system data file './ibdata1' is of a different

发布时间:2020-08-06 23:56:18 来源:ITPUB博客 阅读:374 作者:feelpurple 栏目:MySQL数据库

MySQL异机迁移后,启动数据库报错

# /data/mysql_57_software/bin/mysqld_safe --defaults-file=/etc/my3319.cnf --user=mysql &
# tail -20 /var/log/mysqld3319.log
2019-01-02T07:11:01.716793Z 0 [ERROR] InnoDB: The innodb_system data file './ibdata1' is of a different size 17152 pages (rounded down to MB) than the 64000 pages specified in the .cnf file!
2019-01-02T07:11:01.716832Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2019-01-02T07:11:02.317322Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2019-01-02T07:11:02.317347Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2019-01-02T07:11:02.317353Z 0 [ERROR] Failed to initialize plugins.
2019-01-02T07:11:02.317361Z 0 [ERROR] Aborting


报错原因:

参数文件中的系统表空间大于实际的系统表空间大小,导致启动报错。

# du -sh /data/mysql_3319/ibdata1
268M	/data/mysql_3319/ibdata1
# cat /etc/my3319.cnf
# innodb
innodb_data_file_path=ibdata1:1000M;ibdata2:1000M:autoextend


解决办法:

将参数文件中系统表空间的大小改为小于实际系统表空间大小的值。

# innodb
innodb_data_file_path=ibdata1:256M;ibdata2:256M:autoextend



向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI