mysql无法启动1067错误,Plugin ‘FEDERATED’ is disabled

MYSQL无法启动,提示1067错误,解决步骤如下
1、查看mysql log文件
111228 17:05:41 [Note] Plugin ‘FEDERATED’ is disabled.
InnoDB: Error: data file .\ibdata1 is of a different size
InnoDB: 12219520 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 6742144 pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
111228 17:05:42 [ERROR] Plugin ‘InnoDB’ init function returned error.
111228 17:05:42 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
111228 17:05:42 [ERROR] Unknown/unsupported table type: INNODB
111228 17:05:42 [ERROR] Aborting
2、事件查看器里提示
Plugin ‘InnoDB’ init function returned error.
Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
Unknown/unsupported table type: INNODB
3、问题原因,mysql/data目录下的ibdata1文件大小和配置文件里的文件大小不一致造成。
解决方法:修改my.ini文件
首先查看data目录下的ibdata1文件的大小,如186 GB (200,204,615,680 字节)
将200,204,615,680/1024/1024=190930M 将除以两个1024的结果填入my.ini的innodb设置,如下:
innodb_data_file_path = ibdata1:190930M;ibdata2:8M:autoextend

转载请注明 :IT樵客

此条目发表在 系统故障 分类目录,贴了 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>