|
蓝森林 http://www.lslnet.com 2006年8月26日 15:18
【谁能破解本地的mysql用户名和密码】--【需要说明之处】
突然想不起来mysql的root用户密码了。
按照:idiotlpy的办法:
http://www.lslnet.com/linux/#forum/viewtopic.php?t=432294&show_type=&postdays=0&postorder=asc&start=20&sid=eca42b228811b23a899ae45ed47a3477
[color=green]Windows:
1.用系统管理员登陆系统。
2.停止MySQL的服务。
3.进入命令窗口,然后进入MySQL的安装目录,比如我的安装目录是c:\mysql,进入C:\mysql\bin
4.跳过权限检查启动MySQL,
c:\mysql\bin>;mysqld-nt --skip-grant-tables
5.重新打开一个窗口,进入c:\mysql\bin目录,设置root的新密码
c:\mysql\bin>;mysqladmin -u root flush-privileges password "newpassword"
c:\mysql\bin>;mysqladmin -u root -p shutdown
将newpassword替换为你要用的root的密码,第二个命令会提示你输入新密码,重复第一个命令输入的密码。
6.停止MySQL Server,用正常模式启动Mysql
7.你可以用新的密码链接到Mysql了。[/color]
其中的第四点也许笔误了啊,应该是:mysql --skip-grant-tables
而不是mysqld-nt
我在www.mysql.com上查找到如下:
... through the early releases of MySQL 4.1, the servers included in Windows distributions are named like this: Binary Description mysqld Compiled with full debugging and automatic memory
allocation checking, and InnoDB and BDB tables. mysqld-opt Optimized binary. From version 4.0 on, InnoDB is enabled. Before 4.0, this server includes no transactional table support. [color=red]mysqld-nt Optimized binary for Windows NT, 2000, and XP with support for named pipes. [/color]mysqld-max Optimized binary with support
& http://dev.mysql.com/doc/mysql/en/windows-select-server.html
... "bin" subfolder of the folder where you installed MySQL. If you are using the shareware version of MySQL, the server is called mysqld-shareware.exe . Before proceeding, rename this file to mysqld.exe . From the MS-DOS Prompt, start the server: C:\mysql\bin>;[color=red] mysqld To ensure that the server is started whenever Windows starts, [/color]you might want to create a shortcut to the program and put it in
& http://dev.mysql.com/tech-resources/articles/ddws/3.html
猜测可能是由于操作系统不同吧,才导致mysqld-nt --skip-grant-tables 不好用。
我的操作系统是windows 2003 ,mysql 版本是:4.1.7-nt 版本。
后来我通过:[color=blue]mysqld --verbose --help |more [/color]看到如下:
[color=red] --skip-grant-tables Start without grant tables. This gives all users FULL ACCESS to all tables ! [/color]
[color=blue]mysqld-nt --verbose --help |mor[/color]e 看到如下:
[color=red] --skip-grant-tables Start without grant tables. This gives all users FULL ACCESS to all tables ! [/color]
哦,两者竟然是一样的!
在windows 2003中后者就是不行,而前者是可以的!猜测也许是争取的吧!
有在windows 2000的操作系统中试验过的吗?? |
| |