Install_driver (mysql) failed, installfailed
After the mysql monitoring artifact innotop is installed, innotoop is not available. The error message is install_driver (mysql) failed: can't load '/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql. so 'for module DBD: mysql: libmysqlclient. so.15: cannot open shared object file :... it was found that the problem was caused by DBD several times.
1. Fault
[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. so'
For module DBD: mysql: libmysqlclient. so.15: cannot open shared object file: No such file or directory
/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. Install 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 has been installed and is of the latest version.
[Root @ dbsrv1 yum. repos. d] # rpm-qa | grep-I dbd
Perl-DBD-MySQL-3.0007-2.el5
### First uninstall perl-DBD-MySQL and then use yum to install it again
[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.95-5. el5_9 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
========================================================== ========================================================== ==================================
Package Arch Version Repository Size
========================================================== ========================================================== ==================================
Installing:
Perl-DBD-mysqlx86_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
(2/2): mysql-5.0.95-5.el5_9.x86_64.rpm | 4.9 MB
Bytes -------------------------------------------------------------------------------------------------------------
Total 406 kB/s | 5.0 MB
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. 0007-2.el5
Dependency Installed:
Mysql. x86_64. 0.95-5. el5_9
Complete!
### Enable innotop again
[Root @ dbsrv1 yum. repos. d] # innotop
3. About 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