现象:Python连接MySQL数据库出现
RuntimeError: cryptography is required for sha256_password or caching_sha2_password
解决:安装cryptography
pip install cryptography
原因:
为了提供更安全的密码加密,MySQL8.0的首选默认认证插件是caching_sha2_password,而不是mysql_native_password。
本文介绍了解决Python在连接MySQL8.0时遇到的RuntimeError错误,原因是MySQL8.0默认使用caching_sha2_password认证插件,需要安装cryptography库来支持SHA256密码加密。
现象:Python连接MySQL数据库出现
RuntimeError: cryptography is required for sha256_password or caching_sha2_password
解决:安装cryptography
pip install cryptography
原因:
为了提供更安全的密码加密,MySQL8.0的首选默认认证插件是caching_sha2_password,而不是mysql_native_password。

被折叠的 条评论
为什么被折叠?