西数超哥博客
运维经验教程分享

MySQL的数据迁移,注意检查innodb_log_file_size

MySQL的数据迁移比较简单,但有几点一定要注意:

当启用InnoDB引擎,在my.ini中有一个配置项:innodb_log_file_size

必须保证移植前后这个配置值是相同的,不然服务无法启动

如果不知道这个值咋办呢,查看日志

 

Log代码
  1. InnoDB: Error: log file .ib_logfile0 is of different size 0 359661568 bytes
  2. InnoDB: than specified in the .cnf file 0 56623104 bytes!
  3. 140525 17:21:20 [ERROR] Plugin ‘InnoDB’ init function returned error.
  4. 140525 17:21:20 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
  5. 140525 17:21:20 [ERROR] Unknown/unsupported table type: INNODB
  6. 140525 17:21:20 [ERROR] Aborting

我们看看到,日志很清楚的显示了原来的innodb_log_file_size和现在的innodb_log_file_size,把现在的配置改为原来的即可。

或者改名 ib_logfile0 和ib_logfile1 ,启动mysql服务

赞(0)
声明:本站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,若涉及侵权请及时告知,将会在第一时间删除。本站原创内容未经允许不得转载:西数超哥博客 » MySQL的数据迁移,注意检查innodb_log_file_size