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

一:问题描述

今天在100机器上用xtrabackup远程备份107机器时报错:

[root@single dba]# innobackupex --user=root --password=system@123 --host=10.192.200.107 --port=3307 /download/dandan/bak/

160419 09:39:43 innobackupex: Starting the backup operation


IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".


160419 09:39:44  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=10.192.200.107;port=3307;mysql_socket=/tmp/mysql.sock' as 'root'  (using password: YES).
Failed to connect to MySQL server: DBI connect(';mysql_read_default_group=xtrabackup;host=10.192.200.107;port=3307;mysql_socket=/tmp/mysql.sock','root',...) failed: Host '10.192.200.100' is not allowed to connect to this MySQL server at - line 1314
160419 09:39:59 Connecting to MySQL server host: 10.192.200.107, user: root, password: set, port: 3307, socket: /tmp/mysql.sock
Failed to connect to MySQL server: Host '10.192.200.100' is not allowed to connect to this MySQL server.
[root@single dba]# innobackupex --user=root --password=system@123 --host=10.192.200.107 --port=3307 /download/dandan/bak/
160419 09:40:49 innobackupex: Starting the backup operation


IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".


160419 09:40:49  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=10.192.200.107;port=3307;mysql_socket=/tmp/mysql.sock' as 'root'  (using password: YES).
160419 09:40:49  version_check Connected to MySQL server
160419 09:40:49  version_check Executing a version check against the server...
160419 09:40:53  version_check Done.
160419 09:40:53 Connecting to MySQL server host: 10.192.200.107, user: root, password: set, port: 3307, socket: /tmp/mysql.sock
Using server version 5.5.29-log
innobackupex version 2.3.2 based on MySQL server 5.6.24 Linux (x86_64) (revision id: 306a2e0)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /data/server/mysql_3307/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 = 5242880
InnoDB: Error: log file ./ib_logfile0 is of different size 50331648 bytes

InnoDB: than specified in the .cnf file 5242880 bytes!


在100机器上查询该变量大小:

mysql> show variables like 'innodb_log_file_size';
+----------------------+----------+
| Variable_name        | Value    |
+----------------------+----------+
| innodb_log_file_size | 50331648 |
+----------------------+----------+
1 row in set (0.01 sec)

在107机器上查询该变量大小:

mysql> show variables like 'innodb_log_file_size';
+----------------------+---------+
| Variable_name        | Value   |
+----------------------+---------+
| innodb_log_file_size | 5242880 |
+----------------------+---------+


二:解决办法


1:修改配置文件

在[mysqld]下添加:

innodb_log_file_size=50331648


2:删除ib_logfile文件

mv ib_logfile0 ib_logfile0_bak

mv ib_logfile1 ib_logfile1_bak


3:重启mysql

注意:如果不先删除日志文件的话,重启mysql会报错:

160420 18:07:31 [ERROR] Plugin 'InnoDB' init function returned error.
160420 18:07:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160420 18:07:31 [ERROR] Unknown/unsupported storage engine: InnoDB
160420 18:07:31 [ERROR] Aborting


--本篇文章参考自:http://www.jb51.net/article/27009.htm


你可能感兴趣的:(InnoDB: Error: log file ./ib_logfile0 is of different size 50331648 bytes)