【错误1】

  pymysql.err.InternalError: (1130, "Host '127.0.0.1' is not allowed to connect to this MySQL server")的错误解决

【原因1】不容许本地机器连远程mysql服务,mysql 身份验证出现了问题

【解决1】使用下列步骤解决即可

mysql -u root -p

mysql>use mysql;

mysql>select 'host' from user where user='root';

mysql>update user set host = '%' where user ='root';

mysql>flush privileges;   #刷新权限

 

 

【错误2】

python连接数据库出现错误

RuntimeError: cryptography is required for sha256_password or caching_sha2_password

【解决2】

安装cryptography

pip install cryptography

 

相关文章:

  • 2022-01-06
  • 2021-12-11
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2021-04-27
  • 2021-12-25
相关资源
相似解决方案