报错信息:
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
[root@node01 ~]# mydumper -u root -p iforgot -t 8 -A -o /software/bak_`date +"%Y%m%d"` -v 3mydumper: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory[root@node01 ~]# mydumper -h192.168.49.251 -u root -p iforgot -t 8 -A -o /software/bak_`date +"%Y%m%d"` -v 3mydumper: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory[root@node01 ~]# ll /usr/local/mysql/lib/total 1031328-rw-r--r--. 1 mysql mysql 21045942 Mar 18 2017 libmysqlclient.alrwxrwxrwx. 1 mysql mysql 20 Mar 18 2017 libmysqlclient.so -> libmysqlclient.so.20lrwxrwxrwx. 1 mysql mysql 24 Mar 18 2017 libmysqlclient.so.20 -> libmysqlclient.so.20.3.5-rwxr-xr-x. 1 mysql mysql 9711411 Mar 18 2017 libmysqlclient.so.20.3.5-rw-r--r--. 1 mysql mysql 577971050 Mar 18 2017 libmysqld.a-rw-r--r--. 1 mysql mysql 447294720 Mar 18 2017 libmysqld-debug.a-rw-r--r--. 1 mysql mysql 41678 Mar 18 2017 libmysqlservices.adrwxr-xr-x. 4 mysql mysql 28 Mar 30 14:59 mecabdrwxr-xr-x. 2 mysql mysql 28 Mar 30 14:58 pkgconfigdrwxr-xr-x. 3 mysql mysql 4096 Mar 30 14:59 plugin[root@node01 ~]# cp /usr/local/mysql/lib/libmysqlclient.so.20 /usr/lib/[root@node01 ~]# ldconfig[root@node01 ~]# ldd /usr/local/bin/mydumper linux-vdso.so.1 => (0x00007ffdbe1d4000) libmysqlclient.so.20 => /lib/libmysqlclient.so.20 (0x00007f9845e36000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9845c1a000) libm.so.6 => /lib64/libm.so.6 (0x00007f9845917000) librt.so.1 => /lib64/librt.so.1 (0x00007f984570f000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f984550b000) libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f98451f8000) libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f9844ff6000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f9844d94000) libz.so.1 => /lib64/libz.so.1 (0x00007f9844b7d000) libc.so.6 => /lib64/libc.so.6 (0x00007f98447ba000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f98444b2000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f984429b000) /lib64/ld-linux-x86-64.so.2 (0x0000557137c2a000)[root@node01 ~]#