anand

Well-Known Member
Nov 11, 2002
1,435
1
168
India
cPanel Access Level
DataCenter Provider
Ref: How to replace MySQL with Percona in 11.36 | cPanel Blog

Until recently this was working on a server for me, however with the latest update, it seems to be broken. Now when i execute a php script, it gives me the below error.

Code:
php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
I have recompiled apache using easyapache already twice, but it doesn't seem to fix the issue. Any ideas ?

Thanks
 

ga2host

Registered
PartnerNOC
Dec 19, 2007
3
0
51
cPanel Access Level
Root Administrator
We are also having this problem it has been temporarily resolved by creating a symlink to the .16 library

cd /usr/lib64/
ln -s libmysqlclient.so.16 libmysqlclient.so.18

However easyapache is now failing with this:

checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no

Percona rpms installed:

rpm -qa |grep PerconaPercona-Server-shared-compat-5.5.35-rel33.0.611.rhel5
Percona-Server-shared-56-5.6.16-rel64.0.el5
Percona-Server-client-56-5.6.16-rel64.0.el5
Percona-Server-devel-56-5.6.16-rel64.0.el5
Percona-Server-server-56-5.6.16-rel64.0.el5
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

This is due to the change documented by Percona here:

Percona Server 5.6.16-64.0 is now available - MySQL Performance Blog

Here is a snippet:

In order to comply with Linux distribution packaging standards Percona‘s version of libmysqlclient has been renamed to libperconaserver.
A workaround to this issue would be to create a symbolic link:

Code:
ln -s /usr/lib64/libperconaserverclient.so /usr/lib64/libmysqlclient.so
Then, run EasyApache to rebuild the PHP binaries. Note that Percona is not officially supported by cPanel so issues like this can arise from time to time when using software that cPanel does not test against.

Thank you.
 

anand

Well-Known Member
Nov 11, 2002
1,435
1
168
India
cPanel Access Level
DataCenter Provider
Hello :)

This is due to the change documented by Percona here:

Percona Server 5.6.16-64.0 is now available - MySQL Performance Blog

Here is a snippet:



A workaround to this issue would be to create a symbolic link:

Code:
ln -s /usr/lib64/libperconaserverclient.so /usr/lib64/libmysqlclient.so
Then, run EasyApache to rebuild the PHP binaries. Note that Percona is not officially supported by cPanel so issues like this can arise from time to time when using software that cPanel does not test against.

Thank you.
Thanks for the pointer. Testing this now.
 

DaVinciDigital

Registered
Jun 25, 2013
4
0
1
cPanel Access Level
Root Administrator
Hello :)

This is due to the change documented by Percona here:
Ahem ;)

A workaround to this issue would be to create a symbolic link:
Ticket 4645179

Well, this workaround is not clean and doesn't help matters. Following Percona's indications, we should use the original MySQL libraries. To do so we can install MySQL56-shared-5.6.16-3.cp1142.rpm

Problem is that upcp believes that we don't need the package above and as suck it would uninstall it everytime it is run.

Can we instruct upcp to keep the above mentioned package? In this was we can keep the system clean and ready for upgrades once that cPanel would support Percona officially.
 

LeadDogGraphics

Well-Known Member
Feb 25, 2012
97
1
58
West Palm Beach, FL
cPanel Access Level
Root Administrator
Hello :)



Then, run EasyApache to rebuild the PHP binaries. Note that Percona is not officially supported by cPanel so issues like this can arise from time to time when using software that cPanel does not test against.

Thank you.
Although cPanel, really should look into offer Percona as an option for database. It is a very popular choice and a damn fine database engine.

Thank you for the above code, is there a way as mentioned above to make the link permanent, or will this continue to work through updates?
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,740
300
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
FWIW, I fixed this by installing Percona-Server-shared-compat. Weirdly, its version 5.1 and the server version is 5.5, but its well into the php compile at this point, so it looks like its working.
 

egillette

Well-Known Member
Jan 5, 2010
68
0
56
Orlando, FL
cPanel Access Level
DataCenter Provider
The symbolic link thing worked for me too.

In my case this problem was that libperconaserverclient.so didn't exist.

So I symlinked it to libperconaserverclient.so.18 as shown below:

Code:
[email protected] [/usr/lib64]# ls -lah /usr/lib64/libperconaserverclient.so
lrwxrwxrwx. 1 root root 39 Jul 28 16:29 /usr/lib64/libperconaserverclient.so -> /usr/lib64/libperconaserverclient.so.18*
[email protected] [/usr/lib64]#
 
Last edited: