centos 安装mysqlclient报错

pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp7ax9dy_mbuild/mysqlclient/

解决方案:

yum install mysql-devel(安装依赖)
pip install mysqlclient

  

Host '192.168.31.111' is not allowed to connect to this MySQL server

django.db.utils.OperationalError: (1130, "Host '' is not allowed to connect to this My

解决方案:

然后 执行  FLUSH PRIVILEGES