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 @   tonggc1668  阅读(811)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
点击右上角即可分享
微信分享提示