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


  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值