An issue with MySQL client


Recently I’ve got the following error trying to connect to mysql server:

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

I discovered that it was caused by the Percona libs that were installed on the server.

In order to fix the issue I did the following:
1. Disabled the Percona repositories in /etc/yum.repos.d/. You can either remove the percona.conf file or rename it. Please note that filename can be different. the following command can be of a good help:

grep -i percona *

2. Next we need to find the required packages:

rpm -qa |grep -i Percona

3. Remove the discovered packages excluding dependencies:

rpm -e –nodeps Percona-Server-shared-51

Unfortunately you can’t use yum because it will prompt to remove all packages that depend on Percona libs.

4. Install what we need:

yum install mysql-libs

5. Fix the issues with system tables in MySQL:

mysql_install_db –user=mysql –basedir=/usr/ –ldata=/var/lib/mysql/

Now mysql-server daemon should start without an issue

Share Button

Leave a Reply

You must be logged in to post a comment.