问题:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password
解决方法:1.查看环境变量中是否添加mySQL路径,如果没有,添加上,方法如下:
https://blog.csdn.net/weixin_43860261/article/details/90106077
2.修改加密方式:在cmd中执行
mysql -u root -p use mysql; select user,plugin from user where user=’root’; Alteer user ‘root‘@‘localhost‘ Identified by ‘gao910329‘ password expire never; alter user ‘root‘@‘localhost‘ identified with mysql_native_password by ‘gao910329‘; flush privileges;