I ' m putting together a script that has a requirement of knowing libmysqlclient.so. [15|16|18]. so file. It ' s usually located in/usr/lib/,/usr/lib64/or a mysql/subdirectory of the aforementioned directories.
This would give you all of the Libmysql files recognized by the linker. The higher on the list have the higher priority and are more likely to be linked against.
/sbin/ldconfig -p | grep mysql | cut -d\> -f2
One caveat though is this since most applications link by doing a gcc-lmysqlclient they would favor a file in the Ldconfig Listed as libmysqlclient.so rather than. so.15 or whatever. So personally I would assume, the first libmysqlclient.so is the correct one.
Which shared object library is used depends on the user enviroment and binary this is run. If you to the user, the running the binary and then su - USER
run the command ldd MYSQLBINARY | grep mysqlclient
that would determine which MYSQ Lclient Library is going to be used.
By default in most Linux systems,/usr/lib (used for x86 binaries) and/usr/lib64 (used for x86_64 bit binaries).
BTW, running locate libmysqlclient.so
to get a list of all the GKFX objects that is installed system wide (probably won ' t report . so files installed in user paths though).
Find the location of libmysqlclient.so.x file in Linux environments