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