日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

ldd /usr/bin/mysql_mysql客户端登录时报mysql: relocation error错误

發布時間:2023/12/9 数据库 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ldd /usr/bin/mysql_mysql客户端登录时报mysql: relocation error错误 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在安裝了xtrabackup后,再用下列命令登錄時報下列錯誤

[root@localhost ~]# mysql -u root -p

mysql: relocation error: mysql: symbol strmov, version libmysqlclient_16 not defined in file libmysqlclient.so.16 with link time reference

解決方法:查看該庫文件是否存在

[root@localhost ~]# find / -name libmysqlclient.so.16

/usr/lib64/libmysqlclient.so.16

查看mysql命令運行時所需要的庫文件

[root@localhost ~]# ldd /usr/bin/mysql

linux-vdso.so.1 =>? (0x00007fffe3fff000)

libncursesw.so.5 => /lib64/libncursesw.so.5 (0x00007f387380c000)

libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f38735ee000)

libmysqlclient.so.16 => /usr/lib64/libmysqlclient.so.16 (0x00007f387327f000)

libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f3873048000)

libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f3872e2e000)

libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f3872bc2000)

libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f38727df000)

libz.so.1 => /lib64/libz.so.1 (0x00007f38725c8000)

libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f38722c2000)

libm.so.6 => /lib64/libm.so.6 (0x00007f387203e000)

libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3871e27000)

libc.so.6 => /lib64/libc.so.6 (0x00007f3871a93000)

libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f3871872000)

libdl.so.2 => /lib64/libdl.so.2 (0x00007f387166d000)

/lib64/ld-linux-x86-64.so.2 (0x00007f3873a4b000)

librt.so.1 => /lib64/librt.so.1 (0x00007f3871465000)

libfreebl3.so => /lib64/libfreebl3.so (0x00007f3871262000)

libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f387101d000)

libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f3870d37000)

libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f3870b33000)

libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f3870906000)

libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f38706fb000)

libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f38704f7000)

libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f38702dd000)

libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f38700be000)

從上面可以看到該文件已存在,并且已被調用

3.查看系統中是否安裝了Percona軟件包

[root@localhost ~]# rpm -qa | grep Percona

Percona-Server-shared-51-5.1.73-rel14.12.624.rhel6.x86_64

4.將該軟件包卸載掉

[root@localhost ~]# rpm -e Percona-Server-shared-51-5.1.73 --nodeps

5.禁用percona的軟件源

[root@localhost ~]# cd /etc/yum.repos.d

[root@localhost yum.repos.d]# ls

CentOS-Base.repo? CentOS-Debuginfo.repo? CentOS-fasttrack.repo? CentOS-Media.repo? CentOS-Vault.repo? epel.repo? epel-testing.repo? percona-release.repo

[root@localhost yum.repos.d]# mv percona-release.repo percona-release.repo.disable

6.安裝mysql-libs軟件包

[root@localhost ~]# yum -y install mysql-libs

Loaded plugins: fastestmirror, refresh-packagekit, security

Setting up Install Process

Loading mirror speeds from cached hostfile

* base: mirrors.yun-idc.com

* epel: mirrors.yun-idc.com

* extras: mirrors.yun-idc.com

* updates: mirrors.btte.net

Resolving Dependencies

--> Running transaction check

---> Package mysql-libs.x86_64 0:5.1.73-3.el6_5 will be installed

--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================

Package??????????????????????????????? Arch?????????????????????????????? Version??????????????????????????????????? Repository??????????????????????? Size

=============================================================================================================================================================

Installing:

mysql-libs???????????????????????????? x86_64???????????????????????????? 5.1.73-3.el6_5???????????????????????????? base???????????????????????????? 1.2 M

Transaction Summary

=============================================================================================================================================================

Install?????? 1 Package(s)

Total download size: 1.2 M

Installed size: 4.0 M

Downloading Packages:

mysql-libs-5.1.73-3.el6_5.x86_64.rpm????????????????????????????????????????????????????????????????????????????????????????????????? | 1.2 MB???? 00:07

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Warning: RPMDB altered outside of yum.

** Found 16 pre-existing rpmdb problem(s), 'yum check' output follows:

mysql-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient.so.16()(64bit)

mysql-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)

mysql-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient_r.so.16()(64bit)

mysql-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient_r.so.16(libmysqlclient_16)(64bit)

mysql-5.1.73-3.el6_5.x86_64 has missing requires of mysql-libs = ('0', '5.1.73', '3.el6_5')

mysql-devel-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient.so.16()(64bit)

mysql-devel-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient_r.so.16()(64bit)

mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient.so.16()(64bit)

mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)

mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient_r.so.16()(64bit)

mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of libmysqlclient_r.so.16(libmysqlclient_16)(64bit)

perl-DBD-MySQL-4.013-3.el6.x86_64 has missing requires of libmysqlclient.so.16()(64bit)

perl-DBD-MySQL-4.013-3.el6.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)

2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of libmysqlclient.so.16()(64bit)

2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of libmysqlclient.so.16(libmysqlclient_16)(64bit)

2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of mysql-libs

Installing : mysql-libs-5.1.73-3.el6_5.x86_64????????????????????????????????????????????????????????????????????????????????????????????????????????? 1/1

Verifying? : mysql-libs-5.1.73-3.el6_5.x86_64????????????????????????????????????????????????????????????????????????????????????????????????????????? 1/1

Installed:

mysql-libs.x86_64 0:5.1.73-3.el6_5

Complete!

7.重新登錄進行測試

[root@localhost ~]# mysql -u root -p

Enter password:

Welcome to the MySQL monitor.? Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit

問題解決!

總結

以上是生活随笔為你收集整理的ldd /usr/bin/mysql_mysql客户端登录时报mysql: relocation error错误的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。