select version();
mysql5.6;
update `user` set password=password('12345678') where user='root';
flush privileges;
mysql5.7;
update `user` set authentication_string=password('12345678') where user='root';
flush privileges;
mysql5.8;
ALTER USER 'root'@localhost IDENTIFIED BY '12345678';
FLUSH PRIVILEGES;
全部评论