mysql版本:8.0.28
报错提示:
原因:
最新的 docker mysql 8.0+ 以上版本, 更换了新的身份验证插件(caching_sha2_password), 原来的身份验证插件为(mysql_native_password)
解决办法:
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密码'; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码'; flush privileges;