修改MySQL密码

修改my.conf文件

跳过密码验证 skip-grant-tables 

 

修改密码:

mysql7版本:
mysql> update mysql.user set authentication_string=password('cy7m0ypu8CpLFperzI45') where user='root' and Host = 'localhost'; 
flush privileges;

mysql8版本:

  alter user 'root'@'%' identified by '123456';
  flush privileges;

posted @ 2021-10-25 14:25  孤独一梦  阅读(33)  评论(0编辑  收藏  举报