[Django]-Setup mysql with django on mac os

4👍

For python3 + django 1.11 + mysql on mac. This worked for me:

  1. brew install mysql-connector-c
  2. edit mysql_config (locate it: which mysql_config)

Change the following in mysql_config:

# Create options #
libs="-L$pkglibdir"
libs="$libs -l "

To:

# Create options #
libs="-L$pkglibdir"
libs="$libs -lmysqlclient -lssl -lcrypto"
  1. brew info openssl

  2. and finally pip3 install mysqlclient

and done.

👤IJR

Leave a comment