[Answered ]-Tried to import _mysql through MySQLdb and get the error

2👍

Is libmysqlclient-dev installed? Package might not be exact, but thats the general idea.

0👍

Is this comment thread of any help?

Try updating /etc/ld.so.conf so as to include the directory in which you’ve installed this.

0👍

After struggling with this same issue myself (on the AWS Linux I AMI), I found the answer
here:

While the comment thread already posted was helpful, Apache was clearing my environment variables, so setting LD_RUN_PATH and/or LD_LIBRARY_PATH was not effective.

What ended up working was adding a new include statement to /etc/ld.so.conf and running ldconfig.

Leave a comment