TDLIB > Mysql
mysql忘记密码解决办法| TTTBLOG
Allen   ·  2011.0607 22:56:45
Stat:1142v. 7r. 0u. 0d. 0f 
#0. (Normal)
 
1、运行命令Net stop mysql停止mysql服务
 
2、进mysql的安装路径,bin目录下使用mysqld-nt.exe启动,然后在运行命令
mysqld --skip-grant-tables
mysqld-nt --skip-grant-tables
--(mysqld-nt.exe默认可能没有,下载地址:http://down.qiannao.com/space/file/taoether/-4e0a-4f20-5206-4eab/-8f6f-4ef6-5de5-5177/Mysqld-002dnt.rar/.page)
 
3、另外打开一个命入令行窗口,执行mysql,此时回车一下即可进入。
 
4、按序输入:
use mysql;
update user set password=password("新密码") where user="root";
flush privileges;;exit
 
5、使用任务管理器,找到mysqld-nt的进程,结束进程!
 
6、在重新启动mysql-nt服务,net start mysql就可以用新密码登录了。
 
+++
执行过程如下:
1、运行命令Net stop mysql停止mysql服务
 
2、进mysql的安装路径,bin目录下使用mysqld-nt.exe启动,然后在运行命令mysqld-nt --skip-grant-tables
 
3、另外打开一个命入令行窗口,执行mysql,此时回车一下即可进入。
 
4、按序输入:
use mysql;
update user set password=password("新密码") where user="root";
flush privileges;;exit
 
执行过程如下:
 
C:Program FilesMySQLMySQL Server 5.1in>mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.27-community-nt MySQL Community Edition (GPL)
 
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
 
Type |help;| or |h| for help. Type |c| to clear the current input statement.
 
mysql> use mysql
Database changed
mysql> update user set password=password("abc123") where user="root";
Query OK, 2 rows affected (0.06 sec)
Rows matched: 2 Changed: 2 Warnings: 0
 
mysql> flush privileges;
Query OK, 0 rows affected (0.05 sec)
 
mysql>
【Copyright Notice】
This article is original, follow CC 4.0 BY-SA copyright agreement! Please indicate the original url when repost.
Original url:https://tdlib.com/am.php?t=6tLZGkQJpGn8

Tag:      TTTBLOG
Next
【Related content】
Allen
Reply
#1.  Allen at 2011.0609 13:34:09 - Normal
| 1634 | www.souf51.com | 2011-06-09 13:34:09 | | http://www.souf51.com |
-----
文章收藏了 谢谢
Allen
Reply
#2.  Allen at 2011.0609 13:35:47 - Normal
| 1635 | www.ytzx.net | 2011-06-09 13:35:47 | | http://www.ytzx.net |
-----
正需要 mysql的服务器最近总是出问题
Allen
Reply
#3.  Allen at 2011.0615 21:37:10 - Normal
| 1638 | 超人 | 2011-06-15 21:37:10 | [email protected] | http://www.superm.org |
-----
直接打开数据库里面找表。。哈哈
Allen
Reply
#4.  Allen at 2011.0712 22:16:27 - Normal
| 1664 | BB霜 | 2011-07-12 22:16:27 | [email protected] | http://janyu.net |
-----
这个对用PHP的人都非常有用
Allen
Reply
#5.  Allen at 2011.0712 22:32:53 - Normal
| 1665 | 煎鱼 | 2011-07-12 22:32:53 | [email protected] | http://janyu.net |
-----
以前被这个东西搞死了
Allen
Reply
#6.  Allen at 2011.0726 11:51:14 - Normal
| 1676 | 红蜻蜓 | 2011-07-26 11:51:14 | [email protected] | http://xie.taosdo.com/ |
-----
blog多了有一点太累了
Allen
Reply
#7.  Allen at 2011.0726 14:29:46 - Normal
| 1677 | 丰禾棋牌 | 2011-07-26 14:29:46 | [email protected] | http://www.hx299.com |
-----
技术贴 支持啊支持。。。。
Top     1/1 
You are not logged in, please [Register] or [Login]
(Register in one minute!)
Copyright ©TDLIB, All Rights Reserved.
Powered by TYCMS Version 1002