my.cnf文件中,默认配置为
innodb_data_file_path = ibdata1:10M:autoextend
目前该文件已经扩大到了1g多:
-rw-r----- 1 mysql mysql 1470103552 4月 16 17:13 ibdata1
修改my.cnf为
innodb_data_file_path = ibdata1:1470M;ibdata2:512M:autoextend
重启mysql,报错:
-
InnoDB: Error: data file ./ibdata1 is of a different size
-
InnoDB: 89728 pages (rounded down to MB)
-
InnoDB: than specified in the .cnf file 89600 pages!
需要计算89728/64=1402
修改配置为
innodb_data_file_path = ibdata1:1402M;ibdata2:512M:autoextend
启动mysql,成功!
计算公式:64pages相当于1M
89728/64=1402M
阅读(4818) | 评论(1) | 转发(1) |