Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Error handling of Mydumper installation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Mydumper official website: https://launchpad.net/mydumperMydumper introduces MySQL's own mysqldump tool that supports single-threaded work, exporting multiple tables one by one, without a parallel machine, which makes it impossible to back up data quickly. As a utility, Mydumper can support multithreading, which can read data from tables and write to different files in parallel, which makes it faster than traditional mysqldump in processing speed. One of its features is that the list needs to be locked during processing, so if we need to perform backup work during working hours, it will cause DML blocking. But generally speaking, today's MySQL has a master and slave, and most of the backups are carried out on the slave, so the problem of locking can be ignored. In this way, mydumper can better complete the backup task. Mydumper feature 1. Multithreaded backup 2. Because it is a multi-threaded logical backup, multiple backup files will be generated after the backup. Imposing FTWRL (FLUSH TABLES WITH READ LOCK) on the MyISAM table during backup blocks the DML statement 4. 0. Ensure the consistency of backup data 5. Support for file compression 6. Support for exporting binlog7. Support for multithreaded recovery 8. Support for working in daemon mode, scheduled snapshots and continuous binary logs 9. Support slicing backup files into Mydumper to install # git clone https://github.com/maxbube/mydumper # cd mydumper # less README.md (see help documentation It explains how to compile, install and rely on the package) # yum install glib2-devel zlib-devel pcre-devel openssl-devel cmake # cmake-- Configuring done-- Generating done-- Build files have been written to: / usr/local/mydumper** the presence of Configuring done and Generating done indicates that cmake is successful, if an error is reported Please check the detailed screen output log # make-j 4 # make install (mydumper and myloader will be installed in the / usr/local/bin/ directory) # mydumper # mydumper-- help mydumper: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory (error indicates that the shared library cannot be found) # ldd / usr/local/bin/mydumper linux-vdso.so.1 = > (0x00007ffe2aebb000 ) libmysqlclient.so.20 = > not found libpthread.so.0 = > / lib64/libpthread.so.0 (0x00007fdf6d0a0000) libm.so.6 = > / lib64/libm.so.6 (0x00007fdf6ce1c000) librt.so.1 = > / lib64/librt.so.1 (0x00007fdf6cc14000) libdl.so.2 = > / lib64/libdl.so.2 (0x00007fdf6ca0f000) libglib-2.0.so.0 = > / lib64/libglib-2.0.so.0 (0x00007fdf6c6f8000) libgthread-2.0 .so.0 = > / lib64/libgthread-2.0.so.0 (0x00007fdf6c4f4000) libpcre.so.0 = > / lib64/libpcre.so.0 (0x00007fdf6c2c6000) libz.so.1 = > / lib64/libz.so.1 (0x00007fdf6c0b0000) libstdc++.so.6 = > / usr/lib64/libstdc++.so.6 (0x00007fdf6bdaa000) libc.so.6 = > / lib64/libc.so.6 (0x00007fdf6ba15000) / lib64/ld-linux-x86-64.so.2 (0x00007fdf6d2c9000) libgcc _ s.so.1 = > / lib64/libgcc_s.so.1 (0x00007fdf6b7ff000) # LD_DEBUG=libs / usr/local/bin/mydumper-v 1987: find library=libmysqlclient.so.20 [0] Searching 1987: search cache=/etc/ld.so.cache 1987: search path=/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:/usr/lib64 (system search path) 1987: trying file=/lib64/tls/x86_64/libmysqlclient.so.20 1987: trying file=/lib64/ Tls/libmysqlclient.so.20 1987: trying file=/lib64/x86_64/libmysqlclient.so.20 1987: trying file=/lib64/libmysqlclient.so.20 1987: trying file=/usr/lib64/tls/x86_64/libmysqlclient.so.20 1987: trying file=/usr/lib64/tls/libmysqlclient.so.20 1987: trying file=/usr/lib64/x86_64/libmysqlclient.so.20 1987: trying file=/usr/lib64/libmysqlclient.so. 20 1987:/usr/local/bin/mydumper: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory # locate libmysqlclient.so.20 # ll / usr/local/mysql/lib/ # cp / usr/local/mysql/lib/libmysqlclient.so.20 / usr/lib/ # ldconfig # ldd / usr/local/bin/mydumper # mydumper-- help Usage:mydumper [OPTION...] Multi-threaded MySQL dumpingHelp Options: -?,-help Show help optionsApplication Options:-B,-- database Database to dump-T,-- tables-list Comma delimited table list to dump (does not exclude regex option)-O,-- omit-from-file File containing a list of database.table entries to skip One per line (skips before applying 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- N -- insert-ignore Dump rows with INSERT IGNORE-m,-- no-schemas Do not dump table schemas with the data-d,-- no-data Do not dump table data

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report