k5qsdw
Last Updated: February 25, 2016
·
5.302K
· pzgz
5894706ab8c4aa40257d022e28129f66

Library Not Loaded issue for mysql client on Mac OS

On Mac OS Lion, with mysql installed from source, might get following error when trying to access mysql from rails:

Library not loaded: libmysqlclient.18.dylib (LoadError)

There are two solutons:

  • Put export DLYD_LIBRARY_PATH=/usr/local/mysql/lib into bash profile, somehow, it will raise warning time to time in Lion and ML: 'dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/osascript) is code signed with entitlements', things like that.

  • Run sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib, this works for me.

I bet there must be a better solution to do with the compile options when build from mysql source, untill them, second solution will work for me.

Say Thanks
Respond

4 Responses
Add your response

14830
0 je7gvroz48ztlgvp0ieavthzs5p bxvpxhugvpjo5qbpz8d1luxlr1sxnd1yxirxpws sqfhpsdy

Thank you! It really saved my lot of time.

over 1 year ago ·
15266

I had recompiled about 5 times with different load options - this finally worked, but why it works I don't know, but thanks!

over 1 year ago ·
17606
7cf0d98459ef6222f0e5b6123b4e944c

+1 thank you!

over 1 year ago ·
25062
None

did not work for me on OSX Yosemite(

over 1 year ago ·