InnoDB: Error: log file ./ib_logfile0 is of different size 5242880 bytes

urgel_babay發表於2016-02-29

[root@zhanglin bin]#  ./xtrabackup --defaults-file=/etc/my.cnf --backup --log-stream --target-dir=/mysqlbak/xtrabackup/delta
./xtrabackup version 2.2.3 based on MySQL server 5.6.17 Linux (x86_64) (revision id: )
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /usr/local/mysql/data
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = ./
xtrabackup:   innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
InnoDB: Error: log file ./ib_logfile0 is of different size 5242880 bytes
InnoDB: than specified in the .cnf file 50331648 bytes!


對於使用了預設 my.cnf(一般教程都會教你使用support-files/my-medium.cnf)
如果中間使用了innodb的話,innodb預設的log file大小是56M
解決方法:
1、關閉資料庫,刪除日誌檔案(或者移動到其他目錄,以防MySQL起不來),重新啟動資料庫。

2、如果上面情況後,來時報同樣的錯誤,接下來修改配置檔案將日誌檔案大小設定成備份資料庫的配置大小(比當前要大很多也行)。
修改引數為:
innodb_log_file_size = 1G

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30936525/viewspace-2016607/,如需轉載,請註明出處,否則將追究法律責任。

相關文章