MySQL ALTER USER修改密码

MySQL使用ALTER USER修改密码

https://blog.csdn.net/omaidb/article/details/120036628

Mysql5.6 ERROR 1396 (HY000): Operation CREATE USER failed for 'xxxx'@'localhost '问题解决

https://blog.csdn.net/u012063507/article/details/80454940

 

use mysql; 
drop user 'root'@'localhost';
flush privileges;

use mysql;
select * from user;


create user 'root'@'localhost' identified with mysql_native_password by 'DataBase!@#123..';
create user 'root'@'%' identified with mysql_native_password by 'DataBase!@#123..';
alter user 'root'@'%' identified with mysql_native_password by 'DataBase!@#123..';



grant all privileges on *.* to 'root'@'localhost' with grant option;
flush privileges;
查看账户是否权限分配正确
show grants for 'root'@'%';

 

posted @ 2022-04-29 23:34  tonggc1668  阅读(795)  评论(0编辑  收藏  举报