1. 管理员权限运行命令提示符,登陆MySQL mysql -u root -p password 2. 修改账户密码加密规则并更新用户密码 ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用…
1.通过命令 select user,plugin from user where user='root'; 我们可以发现加密方式是caching_sha2_password. 2. 修改查看加密方式alter user 'root'@'%' identified with mysql_native_password by 'your password';your password这里填自己的mysql密码 3. my.cnf文件添加: default_authentication_plugi…
课后复习 1. No suitable driver found for mysql:jdbc://localhost:3306/test 错误原因: mysql:jdbc://localhost:3306/test jdbc:mysql://localhost:3306/test 2. Not allowed to connect to this MySQL server: 错误原因: jdbc:mysql://192.168.3.20:3306/test 这个设置默认是没有权限的,需要授权…