遭遇DBD::mysql::dr::imp_data_size unexpectedly

    最近的MHA验证时,遭遇了DBD::mysql::dr::imp_data_size unexpectedly这个错误。而DBD这个包已经是安装过了的。下面是这个问题的描述和解决方案。

 

1、故障描述
# masterha_check_repl --conf=/etc/app1.cnf
Mon Feb 16 19:56:29 2015 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Mon Feb 16 19:56:29 2015 - [info] Reading application default configuration from /etc/app1.cnf..
Mon Feb 16 19:56:29 2015 - [info] Reading server configuration from /etc/app1.cnf..
Mon Feb 16 19:56:29 2015 - [info] MHA::MasterMonitor version 0.56.
Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln326] Undefined subroutine &DBD::mysql::db::_login called at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBD/mysql.pm line 140.
 at /usr/lib/perl5/site_perl/5.8.8/MHA/Server.pm line 166
Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln326] Undefined subroutine &DBD::mysql::db::_login called at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBD/mysql.pm line 140.
 at /usr/lib/perl5/site_perl/5.8.8/MHA/Server.pm line 166
Had to create DBD::mysql::dr::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Had to create DBD::mysql::db::imp_data_size unexpectedly at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBI.pm line 1190.
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln326] Undefined subroutine &DBD::mysql::db::_login called at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/DBD/mysql.pm line 140.
 at /usr/lib/perl5/site_perl/5.8.8/MHA/Server.pm line 166
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln326] Got fatal error, stopping operations
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln520] Error happened on checking configurations.  at /usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm line 326
Mon Feb 16 19:56:29 2015 - [error][/usr/lib/perl5/site_perl/5.8.8/MHA/MasterMonitor.pm, ln691] Error happened on monitoring servers.
Mon Feb 16 19:56:29 2015 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

 

2、故障解决
###查看当前系统的dbi与dbd包,如下表明2个包都已安装
# rpm -qa|grep -i dbi
perl-DBI-1.52-2.el5

# rpm -qa|grep -i dbd
perl-DBD-Pg-1.49-4.el5_8
perl-DBD-MySQL-3.0007-2.el5

###我们首先卸载这2个rpm包
# rpm -e --nodeps perl-DBI-1.52-2.el5
# rpm -e --nodeps perl-DBD-MySQL-3.0007-2.el5

###下面使用yum方式分别安装这2个包
# yum install perl-DBI
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirrors.cug.edu.cn
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.hust.edu.cn
 * updates: mirrors.hust.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBI.x86_64 0:1.52-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================
 Package                         Arch           Version          Repository                   Size
===================================================================================================
Installing:
 perl-DBI                        x86_64         1.52-2.el5       base                        600 k

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

Total download size: 600 k
Is this ok [y/N]: y
Downloading Packages:
perl-DBI-1.52-2.el5.x86_64.rpm                                                   | 600 kB     00:01    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-DBI                              1/1

Installed:
  perl-DBI.x86_64 0:1.52-2.el5                                                                                                  

Complete!

# yum install perl-DBD-mysql
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirrors.cug.edu.cn
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.hust.edu.cn
 * updates: mirrors.hust.edu.cn
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
--  Author: Leshami
--  Blog  : http://blog.csdn.net/leshami
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 size: 5.0 M
Total download size: 148 k
Is this ok [y/N]: y
Downloading Packages:
perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm                                 | 148 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : mysql                                                1/2
  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!

###安装后正常。

时间: 2024-10-02 03:18:15

遭遇DBD::mysql::dr::imp_data_size unexpectedly的相关文章

linux编译安装mysql提示Warning: prerequisite DBD::mysql 3 not found错误

在编译percona-toolkit-2.2.9时出现出现如下错误: Checking if your kit is complete- Looks good Warning: prerequisite DBD::mysql 3 not found. Writing Makefile for percona-toolkit 根据建议应该是perl使用的mysql模块未安装所致 解决方案如下: 1.若是centos机器又是有安装yum的话,那么直接yum install perl-DBD-MySQ

MySQL提示shutdown unexpectedly问题解决方法

遇到打开本地环境XAMPP的MySQL时遇到的shutdown unexpectedly错误,那么该如何解决勒?? 关于MySQL启用失败,出现了如下情况: 14:39:05 [mysql] Error: MySQL shutdown unexpectedly. 14:39:05 [mysql] This may be due to a blocked port, missing dependencies, 14:39:05 [mysql] improper privileges, a cras

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  fil

LVS+Keepalived实现MySQL从库读操作负载均衡

说明: 操作系统:CentOS 5.X 64位 MySQL主服务器:192.168.21.126 MySQL从服务器:192.168.21.127,192.168.21.128 MySQL主从同步的数据库为:osyunweidb 实现目的: 增加两台服务器(主备),通过LVS+Keepalived实现MySQL从库读操作负载均衡 架构规划: 操作系统:CentOS 5.X 64位 LVS主服务器:192.168.21.129 LVS备服务器:192.168.21.130 LVS虚拟服务器(VIP

MySQL数据库优化方法总结

中介交易 SEO诊断 淘宝客 云主机 技术大厅 数据库优化是一项很复杂的工作,因为这最终需要对系统优化的很好理解才行.尽管对系统或应用系统的了解不多的情况下优化效果还不错,但是如果想优化的效果更好,那么就需要对它了解更多才行. 1.优化概述 让系统运行得快得最重要因素是数据库基本的设计.并且还必须清楚您的系统要用来做什么,以及存在的瓶颈. 最常见的系统瓶颈有以下几种: 磁盘搜索.它慢慢地在磁盘中搜索数据块.对现代磁盘来说,平时的搜索时间基本上小于10毫秒,因此理论上每秒钟可以做100次磁盘搜索.

MySQL中文参考手册(目录)

mysql|参考|参考手册|中文 MySQL中文参考手册(目录)转载 译者:晏子 [返回][转发] 译者:晏子 (clyan@sohu.com)主页:http://linuxdb.yeah.net 0  译者序 1 MySQL的一般的信息1.1 什么是MySQL? 1.2 关于本手册1.2.1 本手册中使用的约定 1.3 MySQL的历史 1.4 MySQL的主要特征 1.5 MySQL稳定性? 1.6 顺应2000年 1.7 SQL一般信息和教程 1.8 有用的MySQL相关链接 2 MySQ

MySQL中文参考手册5(安装MySQL上)

mysql|参考|参考手册|中文 MySQL中文参考手册5(安装MySQL上)转载 译者:晏子 [返回][转发] 译者:晏子 (clyan@sohu.com)主页:http://linuxdb.yeah.net4 安装MySQL本章描述怎样获得并安装MySQL:  对于你能从其获得MySQL的站点列表,见4.1 怎样获得MySQL. 要了解支持哪些平台,见4.2 MySQL支持的操作系统. 可获得MySQL的多个版本,以二进制代码和源代码形式分发.为了确定你应该使用的分发的版本和类型,见4.4 

更新MySQL数据库服务

mysql|数据|数据库     MySQL首次公开发行的是3 . 11.1版.目前流行的是3.22 系列稳定版的发行版和3.23 系列开发版的发行版.稳定版系列号总是比开发版系列的要小.在3.23 稳定之后,将开始使用3.24 作为开发系列.MySQL开发者好像在夜以继日地工作着,版本更新相当频繁(一年有几次).稳定版和开发版都发布更新版本.正在进行开发的速度给MySQL管理员带来了这样的问题:当新版本出现时是否应该对您已有的MySQL安装进行升级.本节提供了帮助您作出该项决定的一些指导.  

使用Xtrabackup全量备份和恢复mysql数据库

一.Xtrabackup简单概述: Percona  Xtrabackup是开源免费的mysql数据库热备份软件,它能对InnoDB和XtraDB存储引擎的数据库非阻塞地备份(对于MyISAM的备份同样需要加表锁).XtraBackup支持所有的Percona Server.MySQL.MariaDB和Drizzle. XtraBackup优势 : 1.无需停止数据库进行InnoDB热备 2.增量备份MySQL 3.流压缩到传输到其它服务器 4.能比较容易地创建主从同步 5.备份MySQL时不会