JDBC连接MySQL 8版本时eclipse出现
Client does not support authentication protocol requested by server; consider upgrading MySQL client
或者
Access denied for user'root'@'localhost' (using password: NO)
可能是由于navicat版本的问题造成连接失败。mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password
解决:
1.命令窗口输入mysql -u root -p 输入密码陷阱如mysql
2.命令窗口输入use mysql;
3.接着输入alter user ‘root’@‘localhost’ identified with mysql_native_password by ‘密码’;
4.接着输入输入flush privileges; 刷新权限,使修改生效,quit再去连接下就好了。