phpstudy中Client does not support authentication protocol requested by server问题

缪嘉志
2023-12-01

这是一个相关证书协议的问题,mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后加密规则是caching_sha2_password,MySQL版本较高时会出现,解决方法:

在MySQL server文件目录下cmd,运行这两行代码即可:

mysql -u root -p


mysql> alter user 'root'@'localhost' identified with mysql_native_password by '123456';
mysql> flush privileges;

 类似资料: