首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    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 Reposit

    03

    官答丨操作系统升级 Openssl 导致 GreatSQL 无法启动

    本问题来自讨论区群,用户使用数据库环境大概介绍如下: 名称版本操作系统CentOS 7系统内核版本3.10.0-1160.118.1.el7.x86_64openssl升级之前版本1.0.2kopenssl升级之后版本1.1.1w数据库版本GreatSQL-8.0.32-25 用户问题 用户提供的问题信息内容如下: 1、Openssl 版本升级之后 GreatSQL 无法启动报错如下: -- Unit mysqld.service has begun starting up. Jun 07 14:03:21 m-node1 mysqld[34078]: /usr/local/GreatSQL/bin/mysqld: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/GreatSQL/bin/../lib/private/libssl.so.10) Jun 07 14:03:21 m-node1 mysqld[34078]: /usr/local/GreatSQL/bin/mysqld: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/GreatSQL/bin/../lib/private/libssl.so.10) Jun 07 14:03:21 m-node1 systemd[1]: mysqld.service: control process exited, code=exited status=1 Jun 07 14:03:21 m-node1 systemd[1]: Failed to start MySQL Server. 2、用户经过检查,再次安装了 GreatSQL 的 rpm 依赖包,依然报错 so 动态库文件问题 $ yum install -y pkg-config perl libaio-devel numactl-devel numactl-libs net-tools openssl openssl-devel jemalloc jemalloc-devel perl-Data-Dumper perl-Digest-MD5 python2 perl-JSON perl-Test-Simple 3、将 GreatSQL 命令配置到环境变量 PATH 中,依然报错 so 动态库文件问题 $ ln -s /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.17-x86_64 /usr/local/greatsql $ vim /etc/profile export PATH=$PATH:/usr/local/greatsql/bin $ source /etc/profile $ mysql -V mysql: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by mysql) mysql: /usr/local/openssl/lib/libssl.so: version `libssl.so.10' not found (required by mysql) 解答用户疑问 根据现象及报错内容分析,推测极可能是在 /usr/local 目录下安装了更高版本的 Openssl,导致动态库链接失败。 这种情况可以把 Openssl 下的 lib 库加载到 LD_LIBRARY_PATH 环境变量中。 解决用户问题 将 Openssl 下的 lib 库加载到 LD_LIBRARY_PATH 环境变量中。 意思也是为了,不将 /usr/local/openssl/lib 加载到 LD_LIBRARY_PATH 中了。 $ vim /etc/profile export LD_LIBRARY_PATH=/usr/lib64 $ source /etc/profile 使用ldd命令检查mysqld是否缺失依赖so库文件 $ ldd mysqld | grep ssl libssl.so.10 => /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.17- x86_64/bin/./../lib/private/libssl.so.10 (0x00007f292ed72000) $ ldd mysql | grep ssl libssl.so => /lib64/libssl.so (0x000

    01
    领券