install_driver(mysql) failed

    安装好了mysql监控神器innotop,正得意,innotoop不可用,其错误提示为install_driver(mysql) failed: Can't load '/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.15: cannot open shared object  file:...经查原有又是DBD惹的祸,这个问题已经发生过好几次了。

1、故障现象
[root@dbsrv1 ~]# cat /etc/issue
CentOS release 5.11 (Final)
Kernel \r on an \m

[root@dbsrv1 ~]# innotop
localhost PROCESSLIST_NO_IS: install_driver(mysql) failed:
Can't load '/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so'
for module DBD::mysql: libmysqlclient.so.15: cannot open shared object file: No such file or directory at
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230. at (eval 504) line 3
Compilation failed in require at (eval 504) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /usr/bin/innotop line 7601

2、安装perl-DBD-MySQL
[root@dbsrv1 ~]# yum install perl-DBD-MySQL
Loaded plugins: fastestmirror, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.skyshe.cn
 * updates: mirrors.pubyun.com
Setting up Install Process
Package perl-DBD-MySQL-3.0007-2.el5.x86_64 already installed and latest version
Nothing to do
###上面描述已经perl-DBD-MySQL已经安装,且为最新的版本

[root@dbsrv1 yum.repos.d]# rpm -qa |grep -i dbd
perl-DBD-MySQL-3.0007-2.el5

###首先先卸载perl-DBD-MySQL,然后再次使用yum安装
[root@dbsrv1 yum.repos.d]# rpm -e --nodeps perl-DBD-MySQL-3.0007-2.el5
[root@dbsrv1 yum.repos.d]# rpm -qa |grep -i dbd
[root@dbsrv1 yum.repos.d]# yum install perl-DBD-MySQL
Loaded plugins: fastestmirror, security
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.skyshe.cn
 * updates: mirrors.pubyun.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be updated
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
--> Running transaction check
---> Package mysql.x86_64 0:5.0.95-5.el5_9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================
 Package                                Arch            Version           Repository                    Size
=============================================================================================================
Installing:
 perl-DBD-MySQL                         x86_64          3.0007-2.el5      base                         148 k
Installing for dependencies:
 mysql                                  x86_64          5.0.95-5.el5_9    base                         4.9 M

Transaction Summary
=============================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 5.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm                                         | 148 kB     00:00     
(2/2): mysql-5.0.95-5.el5_9.x86_64.rpm                                                | 4.9 MB     00:11     
-------------------------------------------------------------------------------------------------------------
Total                                                                        406 kB/s | 5.0 MB     00:12     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : mysql                                                                                 1/2
warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
  Installing     : perl-DBD-MySQL                                                                        2/2

Installed:
  perl-DBD-MySQL.x86_64 0:3.0007-2.el5                                                                       

Dependency Installed:
  mysql.x86_64 0:5.0.95-5.el5_9                                                                              

Complete!

###再次启用innotop正常
[root@dbsrv1 yum.repos.d]# innotop

3、关于perl-DBD-MySQL
DBD::mysql is the Perl5 Database Interface driver for the MySQL database. In other words: DBD::mysql is an interface between the Perl programming language and the MySQL programming API that comes with the MySQL relational database management system. Most functions provided by this programming API are supported. Some rarely used functions are missing, mainly because no-one ever requested them. :-)

http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm
http://search.cpan.org/dist/DBD-mysql/
遭遇DBD::mysql::dr::imp_data_size unexpectedly 
Temporary failure in name resolution  

时间: 2024-10-21 08:32:21

install_driver(mysql) failed的相关文章

mysql中mysqlhotcopy备份数据库总结

mysqlhotcopy用法 使用mysqlhotcopy之前需要安装perl-DBI和DBD-mysql: 1.执行yum install perl-DBI安装perl-DBI. 2.安装DBD-mysql请参考底部资料 一个常用的备份例子: /usr/local/mysql/bin/mysqlhotcopy -u root -p Zmh537817 --addtodest 数据库名1 数据库名2 备份目录 –addtodest的意思是当备份存在时,不中断备份,只添加新的文件进去. 更多的选项

Innotop简单介绍

  Innotop介绍   Innotop是一款Perl脚本编写.开源.功能强大的MySQ的监控工具,它通过文本模式(命令行模式)监控,功能强大,配置简单,易于使用等等特性.Innotop这个项目位于https://github.com/innotop/innotop上.官方的介绍如下:   innotop is a 'top' clone for MySQL with many features and flexibility. ·         completely customizabl

Postfix配置Q&A

原文地址:http://space.doit.com.cn/51460/viewspace-4943.html 在配置Postfix中遇到的一些问题及相关的解决方法,希望在遇到相同的问题时能起参考的作用.在这里有必要提到一些相关的日志文件,因为很多的错误都会在日志中有体现,日志文件的存放位置可以由用户定义,这里所说的日志文件是按前面的文章中定义的存放位置(http://waringid.blog.51cto.com/65148/58210),请自行参照更改. 显示信件列表:postqueue -

MySQL学习笔记

  Linux 下 C++/C 连接 MySQL 数据库(一) 一.连接前准备 原材料:Ubuntu12.04LTS (已经安装了MySQL5.5或者更高级版本,新立得软件包,gcc/g++或者CodeBlosks编译器) 安装了以上的软件包后,我们可以正常使用MySQL完成数据管理工作,但是很多时候我们需要通过编写程序访问MySQL.此时,在程序中需要加载MySQL驱动头文件,但是默认这些驱动包是没有安装的,因此我们需要在新立得中找到"libmysqld-dev"包并安装. 安装完成

提权,以MySQL之名_安全教程

作者kEvin  注:稿件已刊登于<黑客防线>2005年第7期上,转载请著明版权与出处.  前不久网上公开了一个MySQL Func的漏洞,讲的是使用MySQL创建一个自定义的函数,然后通过这个函数来攻击服务器.最早看到相关的报道是在o-otik上,但是公布的是针对Unix系统的Exploit,并且成功率也不是很高.而近期,国内有高手放出针对Win系统的相关文章,于是我马上找来与朋友一同研究.  其实我们早就能想到.当我们在对MSSQL\Oracle数据库进行攻击的时候,得到了最数据库中高权限

MySQL无法启动:Table mysql.host doesn t exist

提示: Timeout error occurred trying to start MySQL Daemon. Starting MySQL:  [FAILED] 检查了MySQL的日志(cat /var/log/mysqld.log)发现提示一个错误([ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist),如图: 猜测可能是MySQL的默认数据库没正常安装,但卸载

file /usr/share/mysql/charsets/README from install of MySQL-server-5.1.73-1.glibc23.i386 conflicts with file from package mysql-libs-5.1.73-8.el6_8.i6

1:也许之前的机器安装过Mysql,但是自己不知道,账号密码也忘记了,又执行安装操作,导致Mysql不兼容问题.Linux上安装MySQL时出现不兼容的解决办法,错误如下所示: 1 [root@master package]# rpm -ivh MySQL-server-5.1.73-1.glibc23.i386.rpm 2 Preparing... ########################################### [100%] 3 file /usr/share/mysq

oracle迁移postgres之-Ora2Pg

描述 Ora2Pg:甲骨文PostgreSQL数据库模式转换器是一个免费的工具用于Oracle数据库迁移到PostgreSQL兼容模式.它连接Oracle数据库,扫描它自动提取其结构或数据,然后生成SQL脚本,您可以加载到PostgreSQL数据库. Ora2Pg从Oracle数据库逆向工程可以使用巨大的企业数据库迁移或者复制一些Oracle数据成一个PostgreSQL数据库.它很容易使用,不需要任何Oracle数据库知识比提供所需的参数连接Oracle数据库. 安装 首先要感谢Gilles

CentOS 6.6 安装 Infobright 教程详解

infobright 是基于mysql的,但不装mysql亦可,因为它本身就自带了一个.mysql可以粗分为逻辑层和物理存储引擎,infobright主要实现的就是一个存储引擎,但因为它自身存储逻辑跟关系型数据库根本不同,所以,它不能像InnoDB那样直接作为插件挂接到mysql,它的逻辑层是mysql的逻辑 层加上它自身的优化器. Infobright是一个非常强大的列式存储数据库,先前的文章也介绍过.本次主要是针对Infobright的具体安装的记录.中间有可能存在遗漏的,供以后再做完善.