下载链接:https://github.com/maxbube/mydumper/releases
如下图,我需要的是0.9.3版本(https://github.com/maxbube/mydumper/releases/tag/v0.9.3),
我下载的是mydumper-0.9.3-41.el7.x86_64.rpm
[root@mysqltest opt]# wget https://github.com/maxbube/mydumper/releases/download/v0.9.3/mydumper-0.9.3-41.el7.x86_64.rpm
--2021-09-09 13:57:58-- https://github.com/maxbube/mydumper/releases/download/v0.9.3/mydumper-0.9.3-41.el7.x86_64.rpm
Resolving github.com (github.com)... 52.74.223.119
Connecting to github.com (github.com)|52.74.223.119|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/45695616/a2ecc6aa-9486-11e7-9f3b-6d3cf926896f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210909%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210909T055759Z&X-Amz-Expires=300&X-Amz-Signature=e835d376b86c9d0a9d2b63aa07cdfdf5f9ae2a62f901f3934a7e0b60503eebf1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=45695616&response-content-disposition=attachment%3B%20filename%3Dmydumper-0.9.3-41.el7.x86_64.rpm&response-content-type=application%2Foctet-stream [following]
--2021-09-09 13:57:59-- https://github-releases.githubusercontent.com/45695616/a2ecc6aa-9486-11e7-9f3b-6d3cf926896f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210909%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210909T055759Z&X-Amz-Expires=300&X-Amz-Signature=e835d376b86c9d0a9d2b63aa07cdfdf5f9ae2a62f901f3934a7e0b60503eebf1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=45695616&response-content-disposition=attachment%3B%20filename%3Dmydumper-0.9.3-41.el7.x86_64.rpm&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.108.154, 185.199.110.154, 185.199.109.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.108.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1564152 (1.5M) [application/octet-stream]
Saving to: ‘mydumper-0.9.3-41.el7.x86_64.rpm’
100%[====================================================================================================================================================================================================================================>] 1,564,152 695KB/s in 2.2s
2021-09-09 13:58:02 (695 KB/s) - ‘mydumper-0.9.3-41.el7.x86_64.rpm’ saved [1564152/1564152]
[root@mysqltest opt]# ls
mydumper-0.9.1 mydumper-0.9.1.tar.gz mydumper-0.9.3-41.el7.x86_64.rpm mysql-5.7.30-linux-glibc2.12-x86_64 mysql-8.0.20-linux-glibc2.12-x86_64 mysql-shell-8.0.20-linux-glibc2.12-x86-64bit mysql-shell-8.0.20-linux-glibc2.12-x86-64bit.tar rh
[root@mysqltest opt]# yum install -y mydumper-0.9.3-41.el7.x86_64.rpm
[root@mysqltest opt]# mydumper --help
Usage:
mydumper [OPTION?] multi-threaded MySQL dumping
Help Options:
-?, --help Show help options
Application Options:
-B, --database Database to dump
-T, --tables-list Comma delimited table list to dump (does not exclude regex option)
-o, --outputdir Directory to output files to
-s, --statement-size Attempted size of INSERT statement in bytes, default 1000000
-r, --rows Try to split tables into chunks of this many rows. This option turns off --chunk-filesize
-F, --chunk-filesize Split tables into chunks of this output file size. This value is in MB
-c, --compress Compress output files
-e, --build-empty-files Build dump files even if no data available from table
-x, --regex Regular expression for 'db.table' matching
-i, --ignore-engines Comma delimited list of storage engines to ignore
-m, --no-schemas Do not dump table schemas with the data
-d, --no-data Do not dump table data
-G, --triggers Dump triggers
-E, --events Dump events
-R, --routines Dump stored procedures and functions
-W, --no-views Do not dump VIEWs
-k, --no-locks Do not execute the temporary shared read lock. WARNING: This will cause inconsistent backups
--no-backup-locks Do not use Percona backup locks
--less-locking Minimize locking time on InnoDB tables.
-l, --long-query-guard Set long query timer in seconds, default 60
-K, --kill-long-queries Kill long running queries (instead of aborting)
-D, --daemon Enable daemon mode
-I, --snapshot-interval Interval between each dump snapshot (in minutes), requires --daemon, default 60
-L, --logfile Log file name to use, by default stdout is used
--tz-utc SET TIME_ZONE='+00:00' at top of dump to allow dumping of TIMESTAMP data when a server has data in different time zones or data is being moved between servers with different time zones, defaults to on use --skip-tz-utc to disable.
--skip-tz-utc
--use-savepoints Use savepoints to reduce metadata locking issues, needs SUPER privilege
--success-on-1146 Not increment error count and Warning instead of Critical in case of table doesn't exist
--lock-all-tables Use LOCK TABLE for all, instead of FTWRL
-U, --updated-since Use Update_time to dump only tables updated in the last U days
--trx-consistency-only Transactional consistency only
--complete-insert Use complete INSERT statements that include column names
-h, --host The host to connect to
-u, --user Username with the necessary privileges
-p, --password User password
-P, --port TCP/IP port to connect to
-S, --socket UNIX domain socket file to use for connection
-t, --threads Number of threads to use, default 4
-C, --compress-protocol Use compression on the MySQL connection
-V, --version Show the program version and exit
-v, --verbose Verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2
--defaults-file Use a specific defaults file
网上资料中有很多都是源码安装,本人技术不高,cmake . 这一步报的错很隐晦,处理了1个多小时也没有处理好,故转入官网,发现有rpm包的安装方式,一步就安装完成,推荐采用这种安装方式安装