How to fix "Library not loaded: libmysqlclient.18.dylib" in Mac OS X

Well, sometimes a blog simple tip can save a day. That’s why I created this blog.

In this post, I’m going to show a simple way to fix Library not loaded: libmysqlclient.18.dylib error. It could happen when you upgrade your MySQL to the latest version (here it’s 5.7.10).

Just run following command:

sudo ln -s /usr/local/Cellar/mysql/5.7.10/lib/libmysqlclient.dylib /usr/local/lib/libmysqlclient.18.dylib

OR

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

The reason for that error is that your client (let’s say Python Django) is unable to find your libmysqlclient library. That way you can link that library again. everything else should work fine.

Source: New feed

Leave a Reply

Your email address will not be published. Required fields are marked *