I have come across this strange error after installing php-fpm for nginx.
zlibVersion, version libmysqlclient_15 not defined in file libmysqlclient.so.15
From the error it was clear that there is a version mismatch that is defined for ZlibVersion in libmysqlclient.so.15. So next step was to find out which all libmysqlclient.so files are there in the server. Since I was not sure about the path of libmysqlclient locate was my command but before that I should update my database.
root@server1 [~]# updatedb &
root@server1 [~]# locate libmysqlclient.so
and the result was like this.
/usr/lib/libmysqlclient.so /usr/lib/libmysqlclient.so.15 /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so.6 /usr/lib/mysql/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so.15 /usr/lib/mysql/libmysqlclient.so.15.0.0
Now I had removed the link file /usr/lib/libmysqlclient.so.15 and relinked to /usr/lib/libmysqlclient.so.15.0.0
by the command
root@server1 [~]# ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so.15
Now issue php -V command you will see the error vanished.