动态:添加表空间定义文件出错不能添加第2个文件 innodb_data_file_path = /data1/ibdata1:10M:autoextend;/data1/ibdata2:1000M:a...

解决MySQL InnoDB数据文件大小配置错误问题
本文解决了一次遇到的MySQL InnoDB数据文件大小配置错误导致无法添加新文件的问题,通过调整配置文件中的数据文件路径和大小设置,最终成功解决了问题。

遇到问题:
动态:添加表空间定义文件出错不能添加第2个文件
innodb_data_file_path = /data1/ibdata1:10M:autoextend;/data1/ibdata2:1000M:autoextend





InnoDB: Error: data file ./ibdata1 is of a different size
InnoDB: 1152 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 640 pages!
130426  8:46:08 InnoDB: Could not open or create data files.
130426  8:46:08 InnoDB: If you tried to add new data files, and it failed here,
130426  8:46:08 InnoDB: you should now edit innodb_data_file_path in my.cnf back
130426  8:46:08 InnoDB: to what it was, and remove the new ibdata files InnoDB created
130426  8:46:08 InnoDB: in this failed attempt. InnoDB only wrote those files full of
130426  8:46:08 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
130426  8:46:08 InnoDB: remove old data files which contain your precious data!
130426  8:46:08 [ERROR] Plugin 'InnoDB' init function returned error.
130426  8:46:08 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130426  8:46:08 [ERROR] Unknown/unsupported storage engine: InnoDB
130426  8:46:08 [ERROR] Aborting

原因:表格空己经涨到18M,但是指定10M出错


#bug
innodb_data_file_path = ibdata1:10M;ibdata2:10M:autoextend

修改:




[root@james data1]# ll -h
total 30M
drwx------ 2 mysql mysql 4.0K Apr 26 08:04 demo
-rw-rw---- 1 mysql mysql  18M Apr 26 09:17 ibdata1



innodb_data_file_path = ibdata1:18M;ibdata2:10M:autoextend


转载于:https://www.cnblogs.com/kaka100/archive/2013/04/27/3046291.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值