使用xtrabackup还原Failed to connect to MySQL server to detect version
来源:互联网 发布:淘宝联盟佣金怎么领 编辑:程序博客网 时间:2024/04/29 05:35
两台服务器10.11和10.40
今天使用xtrabackup备份还原的时候遇到问题,在10.11备份,10.40还原报错如下:
之前的备份还原是不需要添加该参数的,很奇怪,检查发现是备份的xtrbackup不是我经常使用的2.1.4,而是2.1.2,所以还原上面有些出入
解决:
在备份脚本执行后,我们可以通过查看该日志判断当前使用的xtrabackup版本
确定版本
# more xtrabackup_log_2014-11-25_10\:20\:23 //这是我们要使用的版本2.1.4-->percona-xtrabackup-2.1.4-656.rhel5.x86_64.rpm
xtrabackup_55 version 2.1.4 for Percona Server 5.5.31 Linux (x86_64) (revision id: 656)
# more xtrabackup_log_2014-11-24_16\:06\:55 、//摒弃该版本2.1.2
xtrabackup_55 version 2.1.2 for Percona Server 5.5.16 Linux (x86_64) (revision id: 611)
今天使用xtrabackup备份还原的时候遇到问题,在10.11备份,10.40还原报错如下:
# innobackupex --apply-log --redo-only --user=backupuser --password='123456'--defaults-file=/etc/my_ttnet.cnf /root/bh/backup/full/InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oyand Percona Ireland Ltd 2009-2012. All Rights Reserved.This software is published underthe 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.5版本的,所以我使用--ibbackup xtrabackup_55,
之前的备份还原是不需要添加该参数的,很奇怪,检查发现是备份的xtrbackup不是我经常使用的2.1.4,而是2.1.2,所以还原上面有些出入
解决:
# innobackupex --apply-log --redo-only --user=backupuser --password='123456'--defaults-file=/etc/my_ttnet.cnf /root/bh/backup/full --ibbackup xtrabackup_55..........xtrabackup: Error: cannot open ./xtrabackup_checkpointsxtrabackup: error: xtrabackup_read_metadata()...............141125 9:59:20 InnoDB: Starting shutdown...141125 9:59:21 InnoDB: Shutdown completed; log sequence number 2820572327720141125 09:59:21 innobackupex: completed OK!这里有个ERROR,检查发现在备份的时候就没有生成保有binlog_pos和file信息的文件,我晕啊,于是改用2.1.4版本的xtrabackup重新进行备份。
在备份脚本执行后,我们可以通过查看该日志判断当前使用的xtrabackup版本
确定版本
# more xtrabackup_log_2014-11-25_10\:20\:23 //这是我们要使用的版本2.1.4-->percona-xtrabackup-2.1.4-656.rhel5.x86_64.rpm
xtrabackup_55 version 2.1.4 for Percona Server 5.5.31 Linux (x86_64) (revision id: 656)
# more xtrabackup_log_2014-11-24_16\:06\:55 、//摒弃该版本2.1.2
xtrabackup_55 version 2.1.2 for Percona Server 5.5.16 Linux (x86_64) (revision id: 611)
0 0
- 使用xtrabackup还原Failed to connect to MySQL server to detect version
- Error: Failed to connect to MySQL server: DBI connect(';
- ERROR: Failed to connect to MySQL server: DBI connect(';mysql_read_default_file
- innobackupex: Error: Failed to connect to MySQL server as DBD
- Error -27796: Failed to connect to server
- mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server
- Failed to detect version of solution/project file
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- MYSQL登录错误:mysqladmin: connect to server at ‘localhost’ failed
- MYSQL登录错误:mysqladmin: connect to server at ‘localhost’ failed
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- MYSQL登录错误:mysqladmin: connect to server at 'localhost' failed
- Spring MVC 框架搭建及详解
- cocos2dx关于正常地图的A*算法
- 5天玩转C#并行和多线程编程 —— 第四天 Task进阶
- 第十三周项目四 数组的排序(3)
- Android 避免APP启动闪黑屏的解决办法(Theme和Style)
- 使用xtrabackup还原Failed to connect to MySQL server to detect version
- redis 对支持的数据类型的基本操作
- 使用编码添加约束的规则
- android中的Intent的作用小结
- 马士兵struts2视频教程第六十七集
- MFC中GDI绘图
- 从 MySQL+MMM 到 MariaDB+Galera Cluster : 一个高可用性系统改造
- 第十三周 项目5:去除str1中的空格,仍保存在str1中
- java GC 基本算法总结