郁闷!忘了了MySQL的密码!

标签:
杂谈 |
MySQL的密码竟然让我忘记了,真是郁闷,没办法只能想法子了:
停掉MySQL服务:/usr/local/rc.d/mysql-server
stop
启动MySQL:/usr/local/bin/mysqld_safe
--skip-grant-tables;
这样就可以不需要密码就进入MySQL了。
然后就是:
>use
mysql;
>update
user set password=password('newpass) where
user="root";
重新杀MySQL,用正常方法启动MySQL。http://cnc.imgcache.qq.com/ac/b.gif
前一篇:关闭openssh的密码验证