刚在官网装好MySQL8.0后,我的cmd识别不了启动数据库的指令
需要cd到MySQL的bin目录配置mysql
mysqld --install mysqld --remove mysql -u root -p 123456 use mysql select host,user,authentication_string,plugin from user; #查询
之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password,直接去连接Navicat会报错1251
解决问题方法有两种,一种是升级navicat驱动,一种是把mysql用户登录密码加密规则还原成mysql_native_password.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码 ALTER USER 'kumata'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; #修改kumata用户密码
done!!