image.png
原創(chuàng)Mars'Ares
1、登陸mysql
mysql -uroot -p'password'
2、查看用戶信息
select host,user,plugin,authentication_string from user;
image.png
注:host:%表示可以在任意主機(jī)通過root用戶登陸MySQL她我,localhost表示只能本地登陸枚赡。
plugin:身份認(rèn)證插件,把caching_sha2_password改為mysql_native_password
3滑凉、修改信息
alteruser 'root'@'%' identified with mysql_native_password by 'password'
#password為密碼
select host,user,plugin,authentication_string from user;
image.png
4统扳、使用navicat連接mysql
image.png