percona innobackupex connect to MySQL server as DBD::mysql module is not installed

[root@mysql software]# innobackupex --user=root --password=123456 /data/backup/

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/p

150517 10:17:10  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 2998
        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 2998.

查看mysql.so依赖的lib库 
[root@mysql backup]# ldd /usr/local/lib64/perl5/auto/DBD/mysql/mysql.so
        linux-vdso.so.1 =>  (0x00007fff745e9000)
        libmysqlclient.so.18 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f347f651000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f347f3cd000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f347f1c5000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f347efc0000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f347ec2d000)
        /lib64/ld-linux-x86-64.so.2 (0x000000394f600000)

查看mysql-x86_64.conf
[root@mysql ~]# cat /etc/ld.so.conf.d/mysql-x86_64.conf
/usr/local/mysql/lib/ #这里我把mysql安装在/usr/local/mysql路径下

[root@mysql lib]# find / -name libmysqlclient.so.18  # percona server二进制包竟然没有,找个官方原版的mysql的libmysqlclient.so.18替换了
/opt/mysql/mysql-5.6.22-linux-glibc2.5-x86_64/lib/libmysqlclient.so.18
/root/mysql-5.5.37-linux2.6-x86_64/lib/libmysqlclient.so.18
[root@mysql ~]# ll /opt/mysql/mysql-5.6.22-linux-glibc2.5-x86_64/lib/
total 359616
-rw-r--r-- 1 504 504  17280478 Nov 21 14:03 libmysqlclient.a
lrwxrwxrwx 1 504 504        16 Mar 23 22:46 libmysqlclient_r.a -> libmysqlclient.a
lrwxrwxrwx 1 504 504        17 Mar 23 22:47 libmysqlclient_r.so -> libmysqlclient.so
lrwxrwxrwx 1 504 504        20 Mar 23 22:46 libmysqlclient_r.so.18 -> libmysqlclient.so.18
lrwxrwxrwx 1 504 504        24 Mar 23 22:47 libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0
lrwxrwxrwx 1 504 504        20 Mar 23 22:47 libmysqlclient.so -> libmysqlclient.so.18
lrwxrwxrwx 1 504 504        24 Mar 23 22:46 libmysqlclient.so.18 -> libmysqlclient.so.18.1.0
-rwxr-xr-x 1 504 504   8132535 Nov 21 14:03 libmysqlclient.so.18.1.0
-rw-r--r-- 1 504 504 194714718 Nov 21 14:04 libmysqld.a
-rw-r--r-- 1 504 504 147335474 Nov 21 14:02 libmysqld-debug.a
-rw-r--r-- 1 504 504     14702 Nov 21 14:02 libmysqlservices.a
-rw-r--r-- 1 504 504    754332 Nov 21 14:00 libtcmalloc_minimal.so
drwxr-xr-x 3 504 504      4096 Mar 23 22:47 plugin

重新检查,已经通过
[root@mysql lib]# cp /opt/mysql/mysql-5.6.22-linux-glibc2.5-x86_64/lib/libmysqlclient.so.18.1.0 /lib64/libmysqlclient.so.18        
[root@mysql lib]# ldd /usr/local/lib64/perl5/auto/DBD/mysql/mysql.so
        linux-vdso.so.1 =>  (0x00007fff5bf79000)
        libmysqlclient.so.18 => /lib64/libmysqlclient.so.18 (0x00007f61430bc000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6142e9f000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f6142c1a000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f6142a12000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f614280e000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f614247a000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f6142174000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6141f5e000)
        /lib64/ld-linux-x86-64.so.2 (0x000000394f600000)
   
为了安装重装一次 perl-DBD-MySQL        
[root@mysql lib]# rpm -e --nodeps perl-DBD-MySQL        
[root@mysql lib]# yum -y install perl-DBD-MySQL
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Local                                                                                                                                                                                                                | 4.0 kB     00:00 ... 
Local/primary_db                                                                                                                                                                                                     | 4.4 MB     00:00 ... 
base                                                                                                                                                                                                                 | 3.7 kB     00:00     
base/primary_db                                                                                                                                                                                                      | 4.6 MB     00:00     
epel                                                                                                                                                                                                                 | 4.4 kB     00:00     
epel/primary_db                                                                                                                                                                                                      | 6.5 MB     00:06     
extras                                                                                                                                                                                                               | 3.4 kB     00:00     
extras/primary_db                                                                                                                                                                                                    |  30 kB     00:00     
percona-release-noarch                                                                                                                                                                                               |  951 B     00:00     
percona-release-noarch/primary                                                                                                                                                                                       | 4.5 kB     00:00     
percona-release-noarch                                                                                                                                                                                                                28/28
percona-release-x86_64                                                                                                                                                                                               |  951 B     00:00     
percona-release-x86_64/primary                                                                                                                                                                                       | 153 kB     00:02     
percona-release-x86_64                                                                                                                                                                                                              532/532
updates                                                                                                                                                                                                              | 3.4 kB     00:00     
updates/primary_db                                                                                                                                                                                                   | 3.3 MB     00:16     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================================================
 Package                                                       Arch                                                  Version                                                     Repository                                            Size
============================================================================================================================================================================================================================================
Installing:
 perl-DBD-MySQL                                                x86_64                                                4.013-3.el6                                                 Local                                                134 k

Transaction Summary
============================================================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 134 k
Installed size: 338 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 3 pre-existing rpmdb problem(s), 'yum check' output follows:
mha4mysql-node-0.56-0.el6.noarch has missing requires of perl(DBD::mysql)
percona-toolkit-2.2.14-1.noarch has missing requires of perl(DBD::mysql) >= ('0', '1.0', None)
percona-xtrabackup-2.2.10-1.el6.x86_64 has missing requires of perl(DBD::mysql)
  Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                                                                                                        1/1 
  Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                                                                                                        1/1 

Installed:
  perl-DBD-MySQL.x86_64 0:4.013-3.el6                                                                                                                                                                                                       

Complete!
[root@mysql lib]# innobackupex --user=root --password=123456 /data/backup/      

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013.  All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

Get the latest version of Percona XtraBackup, documentation, and help resources:
http://www.percona.com/xb/p

150517 11:18:55  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
150517 11:18:55  innobackupex: Connected to MySQL server
150517 11:18:55  innobackupex: Executing a version check against the server...
150517 11:18:55  innobackupex: Done.
150517 11:18:55  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!".

innobackupex:  Using server version 5.6.23-72.1-log

innobackupex: Created backup directory /data/backup/2015-05-17_11-18-55

150517 11:18:55  innobackupex: Starting ibbackup with command: xtrabackup  --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/data/backup/2015-05-17_11-18-55 --tmpdir=/data/mysql/mysql3306/tmp --extra-lsndir='/data/mysql/mysql3306/tmp'
innobackupex: Waiting for ibbackup (pid=5069) to suspend
innobackupex: Suspend file '/data/backup/2015-05-17_11-18-55/xtrabackup_suspended_2'

xtrabackup version 2.2.10 based on MySQL server 5.6.22 Linux (x86_64) (revision id: )
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /data/mysql/mysql3306/data
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = /data/mysql/mysql3306/data
xtrabackup:   innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup:   innodb_log_group_home_dir = /data/mysql/mysql3306/logs
xtrabackup:   innodb_log_files_in_group = 3
xtrabackup:   innodb_log_file_size = 209715200
xtrabackup: using O_DIRECT
>> log scanned up to (1739681)
xtrabackup: Generating a list of tablespaces
[01] Copying /data/mysql/mysql3306/data/ibdata1 to /data/backup/2015-05-17_11-18-55/ibdata1
[01]        ...done
[01] Copying ./mydb/t1.ibd to /data/backup/2015-05-17_11-18-55/mydb/t1.ibd
[01]        ...done
[01] Copying ./mydb/tb_t1.ibd to /data/backup/2015-05-17_11-18-55/mydb/tb_t1.ibd
[01]        ...done
[01] Copying ./mysql/slave_master_info.ibd to /data/backup/2015-05-17_11-18-55/mysql/slave_master_info.ibd
[01]        ...done
[01] Copying ./mysql/innodb_index_stats.ibd to /data/backup/2015-05-17_11-18-55/mysql/innodb_index_stats.ibd
[01]        ...done
[01] Copying ./mysql/slave_worker_info.ibd to /data/backup/2015-05-17_11-18-55/mysql/slave_worker_info.ibd
[01]        ...done
[01] Copying ./mysql/slave_relay_log_info.ibd to /data/backup/2015-05-17_11-18-55/mysql/slave_relay_log_info.ibd
[01]        ...done
[01] Copying ./mysql/innodb_table_stats.ibd to /data/backup/2015-05-17_11-18-55/mysql/innodb_table_stats.ibd
[01]        ...done
[01] Copying ./dave/tb_seq.ibd to /data/backup/2015-05-17_11-18-55/dave/tb_seq.ibd
[01]        ...done
>> log scanned up to (1739681)
xtrabackup: Creating suspend file '/data/backup/2015-05-17_11-18-55/xtrabackup_suspended_2' with pid '5069'

150517 11:18:57  innobackupex: Continuing after ibbackup has suspended
150517 11:18:57  innobackupex: Executing LOCK TABLES FOR BACKUP...
150517 11:18:57  innobackupex: Backup tables lock acquired

150517 11:18:57  innobackupex: Starting to backup non-InnoDB tables and files
innobackupex: in subdirectories of '/data/mysql/mysql3306/data/'
innobackupex: Backing up file '/data/mysql/mysql3306/data//mydb/tb_t1.frm'
innobackupex: Backing up file '/data/mysql/mysql3306/data//mydb/db.opt'
innobackupex: Backing up file '/data/mysql/mysql3306/data//mydb/t1.frm'
innobackupex: Backing up files '/data/mysql/mysql3306/data//mysql/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (74 files)
>> log scanned up to (1739681)
innobackupex: Backing up file '/data/mysql/mysql3306/data//dave/tb_seq.frm'
innobackupex: Backing up file '/data/mysql/mysql3306/data//dave/db.opt'
innobackupex: Backing up files '/data/mysql/mysql3306/data//performance_schema/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (53 files)
150517 11:18:58  innobackupex: Finished backing up non-InnoDB tables and files

150517 11:18:58  innobackupex: Executing LOCK BINLOG FOR BACKUP...
150517 11:18:58  innobackupex: Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
150517 11:18:58  innobackupex: Waiting for log copying to finish

xtrabackup: The latest check point (for incremental): '1739681'
xtrabackup: Stopping log copying thread.
.>> log scanned up to (1739681)

xtrabackup: Creating suspend file '/data/backup/2015-05-17_11-18-55/xtrabackup_log_copied' with pid '5069'
xtrabackup: Transaction log of lsn (1739681) to (1739681) was copied.
150517 11:18:59  innobackupex: Executing UNLOCK BINLOG
150517 11:18:59  innobackupex: Executing UNLOCK TABLES
150517 11:18:59  innobackupex: All tables unlocked

innobackupex: Backup created in directory '/data/backup/2015-05-17_11-18-55'
innobackupex: MySQL binlog position: filename 'mysql-bin.000013', position 120
150517 11:18:59  innobackupex: Connection to database server closed
150517 11:18:59  innobackupex: completed OK!

哈哈,备份成功

percona innobackupex 遇到 connect to MySQL server as DBD::mysql module is not installed 问题的更多相关文章

  1. Failed to connect to MySQL server as DBD::mysql module is not installed 问题的解决

    部署PXC ,卸了旧的MySQL perl-DBD-MySQL-4.013-3.el6.x86_64 这个包已经安装了,innobackup时一直在报错: Failed to connect to M ...

  2. PHP连接MySQL报错:SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket 'MySQL' (2)

    如下所示,PHP连接MySQL报错: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket 'MySQL' ...

  3. Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)

    centos7.5 安装mysql数据库报错 问题: [root@db04-54 scripts]# /etc/init.d/mysqld start /etc/init.d/mysqld: line ...

  4. MySQL Server类型之MySQL客户端工具的下载、安装和使用

    本博文的主要内容有 .MySQL Server 5.5系列的下载 .MySQL Server 5.5系列的安装 .MySQL Server 5.5系列的使用 .MySQL Server 5.5系列的卸 ...

  5. MySQL Server类型之MySQL客户端工具的下载、安装和使用(博主推荐)

    本博文的主要内容有 .MySQL Server 5.5系列的下载 .MySQL Server 5.5系列的安装 .MySQL Server 5.5系列的使用 .MySQL Server 5.5系列的卸 ...

  6. MySQL Server类型的MySQL 客户端的下载、安装和使用

    mysql server 5.5的下载 下载地址:https://dev.mysql.com/downloads/mysql/5.0.html#linux mysql server 5.5的安装 双击 ...

  7. Host 'hello-PC' is not allowed to connect to this MySQL server远程连接mysql授权

    问题:"Host 'admin-PC' is not allowed to connect to this MySQLserver"   (其中,admin-PC为我的机器名) 原 ...

  8. innobackupex: Connecting to MySQL server with DSN 'dbi:mysql

    [root@ma src]# innobackupex --user=root /root/backup --no-timestamp InnoDB Backup Utility v1.5.1-xtr ...

  9. XtraBackup出现 Can't connect to local MySQL server through socket '/tmp/mysql.sock'

    Xtrabackup做备份时遇到下面错误信息MySQL server: Can't connect to local MySQL server through socket '/tmp/mysql.s ...

随机推荐

  1. python数据描述符

    Python的描述符是接触到Python核心编程中一个比较难以理解的内容,自己在学习的过程中也遇到过很多的疑惑,通过google和阅读源码,现将自己的理解和心得记录下来,也为正在为了该问题苦恼的朋友提 ...

  2. centos7命令2

    都代表一个程序find / -name '*name*' 查找根目录下的包含name的文件名 权限不足的话在命令前面加上sudo find / -size 1G 查找根目录下文件大小为1G的文件 fi ...

  3. hihocoder1477 闰秒

    地址:http://hihocoder.com/problemset/problem/1477 题目: 闰秒 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 计算机系统中 ...

  4. Web前端页面的浏览器兼容性测试心得(一)搭建测试用本地静态服务器

    自从实习以来,我体验了由一个人编程再到多人协作编程的转换.同时也接触了很多新鲜事物,学到了很多东西.工作时,常常需要多个人协同测试一张H5页面(PC.手机.平板等跨设备测试),也会经常把页面给PM或老 ...

  5. 利用arcgis制作出 源解析要用的ASCII文件

    准备:1.确定好模拟区域范围,精度,行列数          2.确定好源解析的城市规划 思路: 1.全国省级图+本地市县图-->合成一张区域图(联合) 合成之后,添加一个字段,一个数字类型字段 ...

  6. javascript中常用函数汇总

    js中函数很多,在实际项目开发中,函数的应用可以很大程度上简化我们的代码,所以在此记下开发中js中常用的函数,增强记忆. 1.isNaN(X):函数用于检查其参数是否是非数字值. 如果 x 是特殊的非 ...

  7. 同时执行2条不同sql

    select * from  a: select *from b; 用分号结束.

  8. 2017阿里C++研发工程师-校招-单词匹配

    题目描述 给一个字符串, 然后给一个字典. 把字符串分解成字典里的单词组成的句子, 请输出所需空格最少的方案.并输出该方案. 样例 例如: 字符串为: str="ilikealibaba&q ...

  9. BootStrap实现图片轮播

    <div class="container">        <div data-ride="carousel" id="carou ...

  10. Fatal error compiling: java.lang.NoSuc hFieldError??

    用了两天时间,试了各种方法,问题最终解决.是JDK的版本问题:Maven3.5不支持jdk-9.0.1,最后退回:jdk1.8.0_151,问题圆满解决!! [ERROR] Failed to exe ...