1.首先需要在mac安装好mysql
2.遇到错误
error: command 'cc' failed with exit status 1
_mysql.c:44:10: fatal error: 'my_config.h' file not found
解决方案
brew install mysql-connector-c 重装一遍这个
3.遇到错误 string index out of range
vim /usr/local/bin/mysql_config
修改114行
114 libs="$libs -l "
改为 libs="$libs -lmysqlclient -lssl -lcrypto"
在安装MYSQL-PYTHON 成功