参数innodb_data_file_path修改注意事项

来源:互联网 发布:淘宝开店货源免费代理 编辑:程序博客网 时间:2024/06/05 10:09

在测试环境下没有设置过多的详细参数就初始化并启动了服务,后期优化的过程中发现innodb_data_file_path设置过小:

innodb_data_file_path   ibdata1:12M:autoextend

然后修改innodb_data_file_path参数为:

innodb_data_file_path = ibdata1:12M;ibdata2:128M:autoextend

启动服务之后,从错误日志看到如下报错:

2017-05-25T14:45:46.291402+08:00 0 [ERROR] InnoDB: The innodb_system data file '/data/mysql_data/innodb_data/ibdata1' is of a different size 4864 pages (rounded down to MB) than the 768 pages specified in the .cnf file!

大致意思就是ibdata1的大小不是786page*16KB/1024KB=12M,而是4864page*16KB/1024KB=76M(未使用压缩页)
然后修改innodb_data_file_path参数为:

innodb_data_file_path = ibdata1:76M;ibdata2:128M:autoextend

启动成功!

原创粉丝点击