mysql7以前版本密码修改:
set password for root@localhost = password('123');
MySql8.0 root密码修改
update user set authentication_string='' where user='root';--将字段置为空
ALTER user 'root'@'localhost' IDENTIFIED BY 'auasoft20150106';--修改密码为root
flush privileges;
======================
MySQL8以前授权:
grant all privileges on *.* to root@'%' identified by 'auasoft20150106' with grant option;
MySQL8以后授权:
grant all privileges on *.* to 'root'@'%';
FLUSH PRIVILEGES;
转:智能工业专家:www.auasoft.com
本文详细介绍了在MySQL8.0中如何修改root用户的密码,包括将authentication_string字段置空及直接修改密码的方法。同时,对比了MySQL8.0前后授权root用户的区别,提供了具体的grant语句及FLUSH PRIVILEGES命令。
1912

被折叠的 条评论
为什么被折叠?



