$ brew info mysql
Expected output: mysql: stable 8.0.12 (bottled)
$ brew install mysql
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew unlink mysql
$ brew install mysql-connector-c
$ which mysql_config
Edit the mysql_config file, under # Create options:
Replace:
libs="$libs -l "
By:
libs="$libs -lmysqlclient -lssl -lcrypto"
$ pip install mysqlclient
(use sudo if required)
Alternatively, you can install this:
$ pip install MySQL-python
(use sudo if required)
$ brew unlink mysql-connector-c
$ brew link mysql
ld: library not found for -lmysqlclient