Here's the problem in a nutshell:

>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "MySQLdb/__init__.py", line 27, in ?
import _mysql
ImportError: Shared object "libmysqlclient_r.so.12" not found


This had been working. What changed I have no idea. (I'm afraid there are other people on this box.) I tried totally wiping the module (including install directory and re-extracting from tarball) and reinstalling. Same thing. The library file does exist, in the directory that setup.py expects it to be in (FreeBSD 4):

$ ls /usr/local/lib/mysql/libmysqlclient_r.so.12
-rwxr-xr-x 1 root wheel 160971 Feb 27 12:14 /usr/local/lib/mysql/libmysqlclient_r.so.12

I don't think anything is wrong with this file because the command line mysql client works just fine. Any ideas will be greatly appreciated. Thanks.

K.C.