当前位置: 首页 > 工具软件 > DBD-mysql > 使用案例 >

perl-DBD-MySQL 无法安装

郭修平
2023-12-01

问题描述:
在使用innobackupex 中出现了错误
 

-bash-4.1$ innobackupex --defaults-file=./my_3304.cnf --user=xtrabk --password='xtrabk' --socket=./mysql3304.sock /data/mysql/mysql3304/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

 

150510 16:07:50  innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=./my_3304.cnf;mysql_read_default_group=xtrabackup;mysql_socket=./mysql3304.sock' as 'xtrabk'  (using password: YES).

innobackupex: got a fatal error with the following stacktrace: at /data/mysql/tool/percona-xtrabackup-2.2.10-Linux-x86_64/bin/innobackupex line 2998

        main::mysql_connect('abort_on_error', 1) called at /data/mysql/tool/percona-xtrabackup-2.2.10-Linux-x86_64/bin/innobackupex line 1539

innobackupex: Error: Failed to connect to MySQL server as DBD::mysql module is not installed at /data/mysql/tool/percona-xtrabackup-2.2.10-Linux-x86_64/bin/innobackupex line 2998.
 

准备安装

yum install perl-DBI

yum install perl-DBD-MySQL

yum install perl-Time-HiRes

yum install perl-IO-Socket-SSL



问题现象1:

[root@centos1 Packages]# rpm -ivh perl-DBD-MySQL-4.013-3.el6.x86_64.rpm

warning: perl-DBD-MySQL-4.013-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY

error: Failed dependencies:

        libmysqlclient.so.16()(64bit) is needed by perl-DBD-MySQL-4.013-3.el6.x86_64

        libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by perl-DBD-MySQL-4.013-3.el6.x86_64


问题现象2

[root@centos1 etc]# yum install perl-DBD-MySQL
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--&gt Running transaction check
---&gt Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--&gt Processing Dependency: perl(DBI::Const::GetInfoType) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--&gt Processing Dependency: perl(DBI) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--&gt Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--&gt Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--&gt Running transaction check
---&gt Package mysql-libs.x86_64 0:5.1.71-1.el6 will be installed
---&gt Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--&gt Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
 Package                            Arch                       Version                           Repository                    Size
====================================================================================================================================
Installing:
 perl-DBD-MySQL                     x86_64                     4.013-3.el6                       c6-media                     134 k
Installing for dependencies:
 mysql-libs                         x86_64                     5.1.71-1.el6                      c6-media                     1.2 M
 perl-DBI                           x86_64                     1.609-4.el6                       c6-media                     705 k

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

Total download size: 2.0 M
Installed size: 6.0 M
Is this ok [y/N]: y
Downloading Packages:
------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                97 MB/s | 2.0 MB     00:00    
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
  file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL-server-5.6.17-1.el6.x86_64
  file /usr/share/mysql/charsets/armscii8.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL-server-5.6.17-1.el6.x86_64
  file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL-server-5.6.17-1.el6.x86_64
  file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL-server-5.6.17-1.el6.x86_64
  file /usr/share/mysql/charsets/cp1256.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL-server-5.6.17-1.el6.x86_64
  file /usr/share/mysql/charsets/cp1257.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL-server-5.6.17-1.el6.x86_64
  file /usr/share/mysql/charsets/cp850.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL-server-5.6.17-1.el6.x86_64
  file /usr/share/mysql/charsets/cp852.xml from install of mysql-libs-5.1.71-1.el6.x86_64 conflicts with file from package MySQL-server-5.6.17-1.el6.x86_64


解决办法:
下载:
MySQL-shared-compat-5.5.43-1.linux2.6.x86_64.rpm  

[root@centos1 tool]# rpm -ivh MySQL-shared-compat-5.5.43-1.linux2.6.x86_64.rpm
Preparing...                ########################################### [100%]
   1:MySQL-shared-compat    ########################################### [100%]
[root@centos1 tool]# yum install perl-DBD-MySQL
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--&gt Running transaction check
---&gt Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--&gt Finished Dependency Resolution

Dependencies Resolved

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

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

Total download size: 134 k
Installed size: 338 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  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!

问题解决

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13488447/viewspace-1633800/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/13488447/viewspace-1633800/

 类似资料: