Wellcome!
MYSQL Error:InnoDB: Error: data file /mysql/data/innodb/data/ibdata1 is of a different size
由于对MYSQL不是很了解,公司的一套MYSQL DB的参数设定也是在摸索中设定
前几天发现ibdata1这个文件已经达2.3G左右了因此就想限定这个文件的大小(本想限定为3G)
于是就修改了my.cnf这个文件,启动MYSQL发生如下错误:
./mysqld
InnoDB: Error: data file /mysql/data/innodb/data/ibdata1 is of a different size
InnoDB: 147584 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 192000 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!
091122 11:13:17 [ERROR] Plugin 'InnoDB' init function returned error.
091122 11:13:17 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
091122 11:13:17 [ERROR] Unknown/unsupported table type: innodb
091122 11:13:17 [ERROR] Aborting
091122 11:13:17 [Note] ./mysqld: Shutdown complete
是第一个表空间应该大小比匹配。按照提示147584 * 16 /1024 = 2306
重新设定启动MYSQL,一切正常~~
前几天发现ibdata1这个文件已经达2.3G左右了因此就想限定这个文件的大小(本想限定为3G)
于是就修改了my.cnf这个文件,启动MYSQL发生如下错误:
./mysqld
InnoDB: Error: data file /mysql/data/innodb/data/ibdata1 is of a different size
InnoDB: 147584 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 192000 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!
091122 11:13:17 [ERROR] Plugin 'InnoDB' init function returned error.
091122 11:13:17 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
091122 11:13:17 [ERROR] Unknown/unsupported table type: innodb
091122 11:13:17 [ERROR] Aborting
091122 11:13:17 [Note] ./mysqld: Shutdown complete
是第一个表空间应该大小比匹配。按照提示147584 * 16 /1024 = 2306
重新设定启动MYSQL,一切正常~~
