MySQL client error

Today I ran into this error calling the mysql client:

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

Turned out later that Percona libraries were installed on the server instead of the standard mysql-libs.

To fix this, first make sure the percona repositories are disabled. You can rename/delete the percona.repo file from /etc/yum.repos.d/, or edit it and set enable to zero for every repository in that file.

Next, find the package we need:

rpm -qa |grep -i Percona

And remove it:

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

You can’t use yum here because it’ll want to nuke a bunch of dependent packages.

Next, install the needed libraries:

yum install mysql-libs

Fix up the mysql system tables:

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

Now the MySQL daemon should start without issues.

Categories:

Updated: