linux系统云主机如何重设mysql密码?

    文章来源:万象互联 更新时间:2012-12-10 11:09:15
分享:

先结束mysql进程 #killall mysqld
用mysql安全模式运行并跳过权限 #mysqld_safe –skip-grant-tables 用root登录,此时不需要密码 #mysql –u root
现在开始重设密码 #mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with –A
Database changed
Mysql> upsate user set Password=new password where user = ‘root’ ;
Query OK, 2 rows affected (0.02 sec)
Rows matched: 2 Changed: 2 Warnings: 0
Mysql> quit
重新启动mysql服务 #service mysqld restart

版权说明:本站原创文章,由万象互联SEO优化发表.
本文地址:https://www.hulian.top/help/325.html
在线咨询
  • 在线时间
  • 8:00-21:00