错误1:
pymysql is not allowed to connect to this MySQL server
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:
pymql cryptography’ package is required for sha256_password or caching_sha2_password auth methods
解决办法:
这段报错意思是说 sha256_password 和 caching_sha2_password 这两个加密算法需要用到 cryptography 。因此该方法的解决方法就是pip install cryptography