0
转自:KeLe's Blog

1)停止windows服务中的mysql实例  


2)使用–skip-grant-tables 参数启动mysql,这种模式下,无需root密码就可以登陆mysql.

mysqld-max-nt –skip-grant-tables


3)登陆mysql,修改密码


C:\Documents and Settings\Administrator>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-community-max-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Database changed
mysql> update user set password=password("52crack" where user="root";
Query OK, 1 row affected (0.07 sec)
Rows matched: 1 Changed: 1 Warnings: 0



4)然后重新启动mysql. 在这里,我不知道如何正常停止–skip-grant-tables起来的mysqld-max-nt 进程,只能杀掉了。
用tasklist和taskkill ,都是WIN自带的。
然后mysql -uroot -proot就可以登陆了。
收藏本文到网摘: 添加到“Google书签” 添加到“Yahoo收藏” 添加到“QQ书签” 添加到“百度搜藏” 添加到“新浪ViVi收藏夹” 添加到“Del.icio.us” 添加到“365天天网摘” 添加到“天极网摘” 添加到“POCO网摘” 添加到“和讯网摘” 添加到“Bolaa博客收录中心” 添加到“igooi网摘” 添加到“天下图摘”
Tags: | 分类:操作技巧 » 日常应用 | 来源:本站原创 | 引用(0)