mysql修改密码
发布日期:2021-11-08 09:37:48 浏览次数:1 分类:技术文章

本文共 514 字,大约阅读时间需要 1 分钟。

mysql修改用户密码
之前一直用惯了oracle,mysql修改密码虽然一直用,但是一直都没记住现在整理一下
方法一:
mysql> set password for 'root'@'localhost' = password('123');  
方法二:用mysqladmin   
mysqladmin -u用户名 -p现在密码 password 新密码  
mysqladmin -uroot -p123456 password 123   #把现在的123456改为123
方法三:用yodate直接修改user表,简单粗暴   
mysql> use mysql;  
mysql> update user set password=password('123456') where user='root' and host='%'; 
5.7以后authentication_string变成这个字段了
mysql> update user set authentication_string=password('123456') where user='root' and host='%';
mysql> flush privileges;  

转载地址:https://blog.csdn.net/zhengwei125/article/details/79651897 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:mycat下载安装
下一篇:InnoDB: ./ib_logfile0 can't be opened in read-write mode.

发表评论

最新留言

很好
[***.229.124.182]2024年04月23日 19时19分46秒