在centos 6.4 安装部署Percona Xtrabackup,执行全备份脚本,备份不成功,查看日志,报错如下:
11:15:51 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/etc/my.cnf;mysql_read_default_group=xtrabackup;mysql_socket=/data/lib/mysql/mysql.sock' as 'dump' (using password: YES).
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 2999
main::mysql_connect('abort_on_error', 1) called at /usr/bin/innobackupex line 1539
innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at /usr/bin/innobackupex line 2999.
日志显示安装perl-DBD有问题
解决办法:卸载下列软件
rpm -e percona-xtrabackup-2.2.9-5067.el6.x86_64
rpm -e perl-DBI-1.52-2.el5.x86_64 --nodeps
rpm -e perl-DBD-MySQL-4.013-3.el6.x86_64 --nodeps
重新安装软件
rpm -ivh perl-DBI-1.609-4.el6.x86_64.rpm
rpm -ivh perl-DBD-MySQL-4.013-3.el6.x86_64.rpm
rpm -ivh percona-xtrabackup-2.2.9-5067.el6.x86_64.rpm
重新执行全备份脚本,备份成功,查看日志,无报错信息,问题