MySQL启动报错InnoDB:Theinnodb_systemdatafile'./ibdata1'isofadifferent
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
分享文章:MySQL启动报错InnoDB:Theinnodb_systemdatafile'./ibdata1'isofadifferent
分享地址:http://pwwzsj.com/article/pjiide.html