mysql 5.7.30 修改用密码

登陆mysql库中

mysql -uroot -p'12adfefefg'

use mysql

 修改root账号

update user set authentication_string=password('123456') where user='root';

修改本库中该账号的所有

update user set authentication_string=password('L0111233') where user='wanghengzhi';

 修改本库中该账号指定连接地址的

update user set authentication_string=password('iHM1111111111115') where user='wanghengzhi' and host='123.123.123.123';

 

posted @ 2021-10-23 20:25  MR__Wang  阅读(109)  评论(0编辑  收藏  举报