Press enter to see results or esc to cancel.

XtraBackup Complains of Missing perl-DBD-MySQL

I was busy testing a PXC cluster today when suddenly was buffled with a confusing error:

140108 23:33:39 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' (using password: NO).
innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at /usr/bin/innobackupex line 2913.

OK, so my first though was DBD::mysql is missing, but as I checked:

[root@pxc03 keepalived]# yum list installed| grep perl-DBD-MySQL
perl-DBD-MySQL.x86_64 4.013-3.el6 @base

After some digging, it’s not actually the module that is missing – it was one of the module’s dependency which is the mysql client library.

[root@pxc03 keepalived]# yum deplist perl-DBD-MySQL.x86_64|grep mysql
dependency: libmysqlclient.so.16()(64bit)
provider: mysql-libs.x86_64 5.1.71-1.el6
dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit)
provider: mysql-libs.x86_64 5.1.71-1.el6

I recently botched the shared-compat package on this instance while rotating packages with “–nodeps” hence, missing it silently :-D. After reinstalling, everything was again fine. I hope nobody else have to lose hair on this one.