Thursday 4 August 2016

Percona Xtrabackup Issues


Xtrabackup is a very good third party opensource tool for mysql DBA. Although its very easy to configure and use. but at time due to lack of OS dependencies it may fail.

I came across few such OS related issues and thought to document so that people can get benefited.

Error #1


 ./innobackupex --socket=/tmp/mysql.sock --datadir=/software/mysql1/data/ /software/backup/
160804 17:55:30 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!".

Can't locate Digest/MD5.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at - line 693.
BEGIN failed--compilation aborted at - line 693.
160804 17:55:30 Connecting to MySQL server host: localhost, user: (null), password: not set, port: 0, socket: /tmp/mysql.sock
Failed to connect to MySQL server: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).


Execute the following command 

yum install perl-Digest-MD5


====================================================================

Error #2


160804 18:27:20  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;mysql_socket=/tmp/mysql3.sock' (using password: NO).
Failed to connect to MySQL server as DBD::mysql module is not installed at - line 1327.
160804 18:27:20 Connecting to MySQL server host: localhost, user: (null), password: not set, port: 0, socket: /tmp/mysql3.sock
Failed to connect to MySQL server: Can't connect to local MySQL server through socket '/tmp/mysql3.sock' (111).
[root@localhost bin]#


Execute the following command

yum install perl-DBD-MySQL


=================================================================

After this xtrabackup should work absolutely fine

xtrabackup: Transaction log of lsn (1676847) to (1676847) was copied.
160804 18:34:58 completed OK!