mysql 5.5使用xtrabackup 恢复遇到错误Failed to connect to MySQL server to detect version. You must set xtraba

报错

81114 15:44:21  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup' (using password: NO).
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)

一顿百度,没有找到解决办法,没办法只能看报错

仔细阅读发现应该是对应的版本的不对,让后使用报错中提供的参数在恢复

nohup innobackupex --ibbackup=xtrabackup_55  --defaults-file=/etc/my.cnf --apply-log --redo-only /application/mysql/data/backup/bak_2018-11-14/

执行后没有报错

在从新查看报错:发现人家都让你 mysql5.5 的数据库在使用innobackupex 调用 xtrabackup_55 ,而mysql5.5以上使用innobackupex 调用的xtrabackup_56 

总结:还是自己不细心,没有查看报错信息,

你可能感兴趣的:(mysql 5.5使用xtrabackup 恢复遇到错误Failed to connect to MySQL server to detect version. You must set xtraba)