1. SQL> set password for root@localhost=password("xxx");

2. $ mysqladmin -u用户名 -p旧密码 password 新密码

忘记密码

1.SHELL> mysqld_safe --skip-grant-tables 启动后

2. SQL> use mysql;  update user set password=password("xxx") where user='root' and host='localhost';

 

 posted on 2017-11-03 10:17  ChaseForFuture  阅读(254)  评论(0编辑  收藏  举报