mydumper安装

微笑、不失礼 提交于 2021-02-08 14:50:15

CentOS6.6 x64位,MySQL5.7安装mydumper

第一步:下载安装包

下载链接:

https://launchpad.net/mydumper/0.6/0.6.2/+download/mydumper-0.6.2.tar.gz

第二步:安装依赖包

Mydumper安装有很多依赖包,需要提前安装好

yum install cmake glib2-devel mysql-devel zlib-devel pcre-devel openssl-devel

第三步:解压及安装

通常这一步会碰到很多问题,先说步骤:

1.解压到/usr/local/下并创建软连接

tar -zxvf mydumper-0.6.2.tar.gz -C /usr/local/

cd /usr/local

ln -sv mydumper-0.6.2 mydumper

创建连接是为了更好地管理软件包,方便升级等操作

2.编辑及安装

cd /usr/local/mydumper
cmake .
make 
make install

通常问题都出在这里:

(1)编译器错误:

CMake Error: your C compiler: "CMAKE_C_COMPILER-NOTFOUND" was not found.   Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

显示错误,cmake编译器发生错误,这里并不是cmake并身问题,是C编译器没找到,需要安装:

yum install -y gcc-c++

再运行cmake 这个错误消除了

(2)环境变量配置

mydumper安装过程并不需要配置多余的参数,出现这种问题通常是因为之前解压目录里有老的编译文件,再次编译时出了问题:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
MYSQL_LIBRARIES_dl
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2
MYSQL_LIBRARIES_m
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2
MYSQL_LIBRARIES_mysqlclient
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2
MYSQL_LIBRARIES_pthread
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2
MYSQL_LIBRARIES_rt
    linked by target "mydumper" in directory /root/mydumper-0.6.2
    linked by target "myloader" in directory /root/mydumper-0.6.2

这时解决方法了很简单:重新解压再编译安装就可以。

------------------------------------------------------------

如果按步骤安装完成后出现Mysql客户端不能正常登陆的情况,可以参考一下下一篇文章:点这里

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!