0
点赞
收藏
分享

微信扫一扫

解决:NotSupportedError: Authentication plugin ‘caching_sha2_password‘ is not supported


解决:NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported

  • ​​报错如下​​
  • ​​解决办法​​

报错如下

解决:NotSupportedError: Authentication plugin ‘caching_sha2_password‘ is not supported_解决方法

解决办法

mydb = mysql.connector.connect(host="localhost",
user="root",
password="123456",
port=3306)

改为

mydb = mysql.connector.connect(host="localhost",
user="root",
password="123456",
port=3306,
auth_plugin='mysql_native_password')

即可!

更多BUG解决方法,可点击查看​​BUG​​专栏


举报

相关推荐

0 条评论