Bug #47238 Can't add a DB connection - couldn't load library libmysqlclient_r.so
Submitted: 10 Sep 10:37 Modified: 12 Nov 11:29
Reporter: Simone Marchioni
Status: Closed
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.1.18 OS:Linux (Fedora 11, Ubuntu)
Assigned to: Target Version:WB52
Tags: regression, libmysqlclient_r.so connection "fedora 11"
Triage: Needs Triage: D2 (Serious)

[10 Sep 10:37] Simone Marchioni
Description:
Downloaded and installed mysql-workbench-oss-5.1.18-1fc11.i386.rpm from mysql download
website.
It installed well (all dependencies automatically installed) and the application works
(it starts correctly and works).

When I try to add a DB connection it gives me the message:

Test connect failed
Couldn't load library libmysqlclient_r.so: libmysqlclient_r.so: cannot open shared object
file: No such file or directory

But mysql client libraries are installed:

cd /usr/lib/mysql/
ls -l
libmysqlclient_r.so.16      libmysqlclient.so.16      libndbclient.so.3      mysqlbug    
 plugin
libmysqlclient_r.so.16.0.0  libmysqlclient.so.16.0.0  libndbclient.so.3.0.0 
mysql_config

Tried to create a symlink called libmysqlclient_r.so to libmysqlclient_r.so.16 but it
didn't worked out.

How to repeat:
Click on Database\Manage Connections
Click on the "New" button
Try to configure a connection with both connection methods (Standard TCP/IP or Local
Socket - it gives the same error)
Click on the "Test Connection" button

After the display of the error message the application freezes and i have to kill it.

Suggested fix:
Check the path and/or name of the correct libraries
[10 Sep 12:41] Valeriy Kravchuk
Bug #47240 was marked as a duplicate of this one.
[10 Sep 13:06] Valeriy Kravchuk
Verified just as described. Also - on Ubuntu 8.04 with .deb package. Regression bug.
[14 Sep 16:40] Johannes Taxacher
theres a workaround to fix the problem mentioned in Bug #47240
[14 Sep 16:50] Simone Marchioni
What is this workaround?
[23 Sep 10:06] Ignat Alexeyenko
I fixed this in following way in Ubuntu 9.04 (Just created a symlink in /usr/lib
directory)

cd /usr/lib
sudo ln -s libmysqlclient_r.so.15 libmysqlclient_r.so
[22 Oct 3:34] Sergio Abreu
<i>
[23 Sep 10:06] Ignat Alexeyenko

I fixed this in following way in Ubuntu 9.04 (Just created a symlink in /usr/lib
directory)

cd /usr/lib
sudo ln -s libmysqlclient_r.so.15 libmysqlclient_r.so
</i>
Perfect ! Thanks Ignat.
PS: Why don't mysql team include this fix in the original packets  ????
[9 Nov 13:50] Dror Ben-Gai
Hi all,

Happened to me on Fedora 11 (x64) on Workbench ver 5.1.18, my solution was to put the
following softlink in /usr/lib64/mysql-workbench:

libmysqlclient_r.so -> /usr/lib64/mysql/libmysqlclient_r.so.16.0.0

This took care of the problem..

Thx,
D.
[11 Nov 18:10] Johannes Taxacher
this problem has been fixed. linking of connector lib has been changed.
fix will be included in 5.2.7
[12 Nov 11:29] Tony Bedford
An entry has been added to the 5.2.7 changelog:

When an attempt was made to add a database connection the following error was generated:

Test connect failed
Couldn't load library libmysqlclient_r.so: libmysqlclient_r.so: cannot open shared
object
file: No such file or directory

This only happened on Linux.