安装MySQL驱动
由于MySQL服务器以独立的进程运行,并通过网络对外服务,所以,需要支持Python的MySQL驱动来连接到MySQL服务器。MySQL官方提供了mysql-connector-python驱动,但是安装的时候需要给pip命令加上参数--allow-external:
pip install mysql-connector-python --allow-external mysql-connector-python
所以我直接在requirements.txt里面这样写会有问题吗?
flask-restful
mysql-connector-python
为什么不用 MySQL-python ?