取代mysqldump的新工具mydumper
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了取代mysqldump的新工具mydumper相关的知识,希望对你有一定的参考价值。
下载地址:https://launchpadlibrarian.net/225370879/mydumper-0.9.1.tar.gz
# yum -y install glib2-devel mysql-devel zlib-devel pcre-devel cmake
# tar xf mydumper-0.9.1.tar.gz
# cd mydumper-0.9.1
# cmake .
# make && make install
解压的安装的mysql server 报错:
[[email protected] mydumper-0.9.1]# mydumper -h
mydumper: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
拷贝库到/lib64/下:
# cp /home/data/mysql-5.6.32/lib/libmysqlclient.so.18 /lib64/
备份性能比较:
# time mydumper -u root -p "123456" -B zabbix -o /usr/local/src/bak/1/
real 0m2.733s
user 0m1.075s
sys 0m0.158s
# time /data/mysql-5.6.32/bin/mysqldump -u root -p"123456" -q --single-transaction -B zabbix > zabbix.sql
real 0m15.019s
user 0m1.495s
sys 0m0.271s
用myloader导入该XXDB数据库
# time myloader -u root -p 123456 -d /usr/local/src/bak/1/
导出 mydumper 要比mysqldump快一倍
导入 myloader 要比自带的mysql快一倍
以上是关于取代mysqldump的新工具mydumper的主要内容,如果未能解决你的问题,请参考以下文章