caching_sha2_password is not supported 解决方法

2023-12-23 17:52:44

File "/usr/local/lib/python3.10/dist-packages/mysql/connector/authentication.py", line 190, in get_auth_plugin
? ? raise errors.NotSupportedError(
mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported

报错分析

pip install mysql-connector后报错mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not suppot.

原因: 如果你的 MySQL 是 8.0 版本,密码插件验证方式发生了变化,早期版本为 mysql_native_password,8.0 版本为 caching_sha2_password

这个错误是因为你的MySQL服务器使用了 “caching_sha2_password” 认证插件,而你的Python MySQL驱动程序(mysql-connector)不支持该认证插件。

root@launch-advisor-20211123:/home# pip install --upgrade mysql-connector-python

文章来源:https://blog.csdn.net/xdpcxq/article/details/135171171
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。