Where is libmysqlclient?

I do compile the Percona 8 like below but cannot find where is libmysqlclient. i can see it in 5.7.

I got issues with Xtrabackup " XtraBackup Complains of Missing perl-DBD-MySQL" and other tool like Zabbix when i compile, it always ask for libmysqlclient

Is this lib include on source package or i need to yum or compile from other souce?

cmake -Wno-dev -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Release -DFORCE_INSOURCE_BUILD=ON -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_unicode_ci -DENABLE_DOWNLOADS=1 -DINSTALL_INCLUDEDIR=/usr/include -DINSTALL_LAYOUT=STANDALONE -DINSTALL_LIBDIR=/usr/lib64/mysql -DINSTALL_PKGCONFIGDIR=/usr/lib64/pkgconfig -DMYSQLX_TCP_PORT=33060 -DMYSQLX_UNIX_ADDR=/tmp/mysqlx.sock -DINSTALL_STATIC_LIBRARIES=ON -DMYSQL_DATADIR=/var/data/mysql -DMYSQL_MAINTAINER_MODE=OFF -DMYSQL_TCP_PORT=3306 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSTEMD_PID_DIR=/var/data/mysql -DSYSTEMD_SERVICE_NAME=mysqld -DTMPDIR=/tmp -DWITH_BOOST=/soft/boost_1_73_0 -DWITH_CURL=system -DWITH_EDITLINE=bundled -DWITH_ICU=bundled -DWITH_INNODB_MEMCACHED=ON -DWITH_LIBEVENT=bundled -DWITH_LZ4=bundled -DWITH_NUMA=ON -DWITH_PROTOBUF=bundled -DWITH_RAPIDJSON=bundled -DWITH_SSL=/usr -DWITH_SYSTEMD=ON -DWITH_ZLIB=system -DWITH_ZSTD=bundled -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 -DWITH_TOKUDB=1 -DWITH_ROCKSDB=1
1 Like

Have you tried searching for it? find /usr/ -name "libmysqlclient*"

1 Like

Hi Matt,

That is first cli that i tried to find before i post this forum :slight_smile:

I cannot see this lib from mysql 8 version

[root@localhost ~]# find / -name libmysqlclient*
[root@localhost ~]# mysql -V
mysql  Ver 8.0.25-15 for Linux on x86_64 (Source distribution)

Just wonder if i install this lib by download rpm package from mysql community then is that compatible with Percona or not?

Thanks

1 Like

Well, you need to decide if you want to compile Percona MySQL 8 and use that, or use our RPMs. Why are you compiling? Also, why would you download mysql community rpm for this library? Why not download the percona library rpm?

1 Like

I want to use Percona server and yes with compile, after compile that i cannot find libmysqlclient so that is a reason why i ask for install this lib by rpm from mysql community version.

Yes, i forget Percona may have this rpm but just wonder why i cannot see this lib after compile or i need to install separately and if i do so then do it conflict to my server?

@abh I just did a compile and I found the library. I’ll have ask one of the developers why it isn’t named libmysqlclient, but I imagine it is safe to simply create a symlink and then run an ldconfig before linking against it.

/tmp/ps_8.0.25-15/lib/libperconaserverclient.so.21.1.25
/tmp/ps_8.0.25-15/lib/libperconaserverclient.so.21
/tmp/ps_8.0.25-15/lib/libperconaserverclient.so

1 Like

Hi @abh.
Yes we compile libperconaserverclient.so by default.
In our rpm packages we still provide libmysqlclient.so.
So if you need to compile by yourself you could apply patch percona-server/mysql-5.7-sharedlib-rename.patch at 8.0 · percona/percona-server · GitHub and it will compile mysqld linked with libmysqlclient.
Also we recommend using our build script to compile PerconaServer for MySQL by your own.
Here it is: percona-server/percona-server-8.0_builder.sh at 8.0 · percona/percona-server · GitHub
How to correctly use it you can read in our blog: How to Build Percona Server for MySQL From Sources - Percona Database Performance Blog

1 Like