标签:mysql use host password 改密码 local nbsp cat grant
mysql8:
alter user ‘root‘@‘localhost‘ identified by ‘123456‘;
mysql5.7:
update user set authentication_string = password(‘123456‘) where user = ‘root‘ and Host = ‘localhost‘;
flush privileges;
如果flush 无效,就加上下面这句:
grant all privileges on *.* to ‘root‘@‘localhost‘ identified by ‘123456‘ with grant option;
标签:mysql use host password 改密码 local nbsp cat grant
原文地址:https://www.cnblogs.com/xdl824/p/14419981.html