Error while loading shared libraries: libmysqlclient.so.18

Hi guys,

We recently updated one of our machines from mariadb to mysql.
This version of MySQL has given us the file libmysqlclient.so.20.3.11 in /usr/lib64/mysql.

On our other machinse that are monitoring mariadb, we have libmysqlclient.so.18.0.0 with a symlink to that file called libmysqlclient.so.18.

Is there a way we can change the plugin “check_mysql” to stop looking for the 18 version file and instead look for the 20 version?
The full error we’re getting is /usr/lib64/nagios/plugins/check_mysql: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory.

Many thanks,
Plumel

One way might be to create a wrapper script which sets the relevant environment variable to the location of libmysqlclient.so.20.3.11 and then execute check_mysql as usual.

Compile the script with the different versions of libmysqlclient yourself?