install_driver(mysql) failed

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS MySQL,高可用系列 2核4GB
简介:     安装好了mysql监控神器innotop,正得意,innotoop不可用,其错误提示为install_driver(mysql) failed: Can't load '/usr/lib64/perl5/vendor_perl/5.
    安装好了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  
相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
12天前
|
SQL DataWorks 关系型数据库
DataWorks操作报错合集之如何处理数据同步时(mysql->hive)报:Render instance failed
DataWorks是阿里云提供的一站式大数据开发与治理平台,支持数据集成、数据开发、数据服务、数据质量管理、数据安全管理等全流程数据处理。在使用DataWorks过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
|
前端开发 Java 关系型数据库
记录:Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl...解决方案【亲测有效】
记录:Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl...解决方案【亲测有效】
4979 0
|
2月前
|
缓存 关系型数据库 MySQL
error: Failed dependencies: mariadb-connector-c-config is obsoleted by mysql-community-server-8.0.36-1.el7.x86_64 问题解决
error: Failed dependencies: mariadb-connector-c-config is obsoleted by mysql-community-server-8.0.36-1.el7.x86_64 问题解决
85 19
|
25天前
|
存储 SQL 关系型数据库
|
2月前
|
关系型数据库 MySQL Linux
error: Failed dependencies: libncurses.so.5()(64bit) is needed by mysql-community-client-8.0.36-1.el7.x86_64 libtinfo.so.5()(64bit) is needed by mysql-community-client-8.0.36-1.el7.x86_64 如何解决?
error: Failed dependencies: libncurses.so.5()(64bit) is needed by mysql-community-client-8.0.36-1.el7.x86_64 libtinfo.so.5()(64bit) is needed by mysql-community-client-8.0.36-1.el7.x86_64 如何解决?
155 3
|
3月前
|
关系型数据库 MySQL 数据安全/隐私保护
mysql无法启动服务connect to server at ‘localhost‘ failed
mysql无法启动服务connect to server at ‘localhost‘ failed
|
4月前
|
关系型数据库 MySQL 数据库
MySQL 启动 登录报错Job for mysqld.service failed because the control process exited with error code. See
MySQL 启动 登录报错Job for mysqld.service failed because the control process exited with error code. See
|
4月前
|
关系型数据库 MySQL 数据库
MySQL【部署 03】8.0.25离线部署(下载+安装+配置)Failed dependencies 问题处理及8.0配置参数说明
MySQL【部署 03】8.0.25离线部署(下载+安装+配置)Failed dependencies 问题处理及8.0配置参数说明
463 0
|
11月前
|
关系型数据库 MySQL Linux
suse系统mysql不能启动:Unit mysql.service failed to load: No such file or directory
suse系统mysql不能启动:Unit mysql.service failed to load: No such file or directory
|
11月前
|
关系型数据库 MySQL 数据安全/隐私保护
MySQL安装--connect to server的界面上输入密码显示connection failed
MySQL安装--connect to server的界面上输入密码显示connection failed
349 0

热门文章

最新文章

下一篇
云函数