zoukankan      html  css  js  c++  java
  • mha 安装部署报错 failed: Attempt to reload DBD/mysql.pm aborted

     
    [root@hz-op-mysql03.test /root]# masterha_check_repl --conf=/home/mha/conf/app1.conf
    Tue Sep 29 14:16:25 2020 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
    Tue Sep 29 14:16:25 2020 - [info] Reading application default configuration from /home/mha/conf/app1.conf..
    Tue Sep 29 14:16:25 2020 - [info] Reading server configuration from /home/mha/conf/app1.conf..
    Tue Sep 29 14:16:25 2020 - [info] MHA::MasterMonitor version 0.58.
    Tue Sep 29 14:16:25 2020 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln301] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
    Compilation failed in require at (eval 37) line 3.
     
    at /usr/share/perl5/vendor_perl/MHA/DBHelper.pm line 208.
    at /usr/share/perl5/vendor_perl/MHA/Server.pm line 166.
    Tue Sep 29 14:16:25 2020 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln301] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
    Compilation failed in require at (eval 37) line 3.
     
    at /usr/share/perl5/vendor_perl/MHA/DBHelper.pm line 208.
    at /usr/share/perl5/vendor_perl/MHA/Server.pm line 166.
    Tue Sep 29 14:16:25 2020 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln301] install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.
    Compilation failed in require at (eval 37) line 3.
     
    at /usr/share/perl5/vendor_perl/MHA/DBHelper.pm line 208.
    at /usr/share/perl5/vendor_perl/MHA/Server.pm line 166.
    Tue Sep 29 14:16:26 2020 - [error][/usr/share/perl5/vendor_perl/MHA/ServerManager.pm, ln309] Got fatal error, stopping operations
    Tue Sep 29 14:16:26 2020 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations.  at /usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm line 329.
    Tue Sep 29 14:16:26 2020 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers.
    Tue Sep 29 14:16:26 2020 - [info] Got exit code 1 (Not master dead).
     
    MySQL Replication Health is NOT OK!
     
    参考网上文档并没有解决问题,因为处理过程中报错
     
    yum install -y cpan
    cpan -D DBI     
    cpan DBD::mysql
     
    cpan DBD::mysql
     
    [root@hz-op-mysql03.test /root]# cpan DBD::mysql
    Reading '/root/.cpan/Metadata'
      Database was generated on Mon, 28 Sep 2020 02:17:03 GMT
    Running install for module 'DBD::mysql'
    Running make for D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz
    Checksum for /root/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ok
     
      CPAN.pm: Building D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz
     
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 89.
     
    Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
    not contain the path to mysql_config. Resorting to guessed values!
     
     
    PLEASE NOTE:
     
    For 'make test' to run properly, you must ensure that the
    database user 'root' can connect to your MySQL server
    and has the proper privileges that these tests require such
    as 'drop table', 'create table', 'drop procedure', 'create procedure'
    as well as others.
     
    mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';
     
    You can also optionally set the user to run 'make test' with:
     
    perl Makefile.PL --testuser=username
     
    Can't exec "mysql_config": No such file or directory at Makefile.PL line 603.
    Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
    Failed to determine directory of mysql.h. Use
     
      perl Makefile.PL --cflags=-I<dir>
     
    to set this directory. For details see DBD::mysql::INSTALL,
    section "C Compiler flags" or type
     
      perl Makefile.PL --help
    Warning: No success on command[/usr/bin/perl Makefile.PL]
    'YAML' not installed, will not store persistent state
      DVEEDEN/DBD-mysql-4.050.tar.gz
      /usr/bin/perl Makefile.PL -- NOT OK
    Running make test
      Make had some problems, won't test
    Running make install
      Make had some problems, won't install
     
     
     
    解决这个问题 Can't exec "mysql_config": No such file or directory at Makefile.PL line 89. 库文件缺失
     
    cp -r /root/5.7.30/include/* /usr/include/
    cp -r /root/5.7.30/lib/* /usr/lib/
     
     
  • 相关阅读:
    Capture CIS:Capture was not found错误
    Memcached FAQ
    MTK META工具的使用和注意事项(MT6252)
    关于maps.google.com和ditu.google.cn地图偏差的说明
    VSS2005的二次开发
    同学PB经历的面试题
    给定一个字符串,包含中文字符和英文字符,取给定大小字节的子串。
    一些笔试题目和整理的答案 腾讯(Tencent)
    redhat面试题目
    Ubuntu远程链接Ubuntu之ssh
  • 原文地址:https://www.cnblogs.com/mhabbyo/p/13750397.html
Copyright © 2011-2022 走看看