Pycharm连接MySQL报错:RuntimeError: cryptography is required for sha256_password or caching_sha2_password
报错如下:报错原因:MySQL8.0版本以后采用caching_sha2_password作为默认的身份验证插件。解决方法:1.登录mysql:mysql>mysql-uroot-pEnterpassword:2.查询用户密码:mysql>selecthost,user,authentication_stringfrommysql.user;3.设置(或修改)root用户密码:ALTERuser'