【xtrabackup故障】Failed to connect to MySQL to detect version
今天在做数据库备份数据遇到一个问题,主要原因是:备份和恢复的时候使用的xtrabackup的版本不一致
问题
使用xtrabackup校验数据的时候报错:
# innobackupex --apply-log /data/back/ InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy and Percona Ireland Ltd 2009-2012. All Rights Reserved. This software is published under the GNU GENERAL PUBLIC LICENSE Version 2, June 1991. 141125 09:43:44 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'backupuser' (using password: YES). Failed to connect to MySQL server to detect version. You must set xtrabackup version to use with --ibbackup option. Possible values are xtrabackup_55 (for MySQL 5.5), xtrabackup_56 (for MySQL or Percona Server 5.6, or xtrabackup (for MySQL 5.1 with InnoDB plugin or Percona Server)
根据报错提示,失败查明mysql的版本,需要指明--ibbackup选项,因为我的mysql是5.6版本的,所以我使用--ibbackup xtrabackup_56,
之前的备份还原是不需要添加该参数的,很奇怪,检查发现是备份的xtrbackup不是我经常使用的2.4,而是2.1.9,所以还原上面有些出入
解决:
# innobackupex --use-memory=1G --apply-log /data/back --ibbackup xtrabackup_56 ................................................... InnoDB: 5.6.17 started; log sequence number 3974285875212 [notice (again)] If you use binary log and don't use any hack of group commit, the binary log position seems to be: InnoDB: Last MySQL binlog file position 0 365497561, file name mysql-bin.003475 xtrabackup: starting shutdown with innodb_fast_shutdown = 1 InnoDB: FTS optimize thread exiting. InnoDB: Starting shutdown... InnoDB: Shutdown completed; log sequence number 3974285876610 171011 09:43:10 innobackupex: completed OK!
相关推荐
wanjichun 2020-07-18
xiaoxiangyu 2020-06-16
wenjieyatou 2020-06-12
xjd0 2020-04-26
景泽元的编程 2020-02-17
勇往直前 2020-02-13
Java学习 2020-01-17
Zn昕 2018-12-14
梦想小镇 2017-06-14
jiong 2017-02-15
FORYAOSHUYUN 2016-12-22
CHINA华军 2016-11-30
huolan 2016-11-29
jacklife 2016-09-15
这些年来 2016-08-22
vincen 2016-08-09
slwang00 2016-07-02
qwertyanglu 2016-04-30
liangkaiping0 2016-01-09
这些年来 2015-08-17