繁体中文  设为首页  加入收藏 
当前位置:学院首页 >> 实战 >> 密码破解 >> mysql 恢复密码


mysql 恢复密码

2008-06-25 10:50:38  www.hackbase.com  来源:互联网
mysql 恢复密码 OS:[root@localhost ~]# cat /etc/redhat-release CentOS release 4.4 (Final)Mysql Version:version: 4.1.20-log step 1: ./mysqld_safe --skip-grant-tables & [root@localhost ~]# ps u ...

mysql 恢复密码

OS:
[root@localhost ~]# cat /etc/redhat-release
CentOS release 4.4 (Final)
Mysql Version:
version: 4.1.20-log


step 1:

./mysqld_safe --skip-grant-tables  &

[root@localhost ~]# ps ux
root      4976  0.2  0.2  5328 1160 pts/1    S+   11:43   0:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables

[root@localhost ~]# netstat -ant|grep 3306
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN     


step 2:

[root@localhost ~]# /usr/bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.20-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
Database changed
mysql> update user set password=password('') where user='root';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 1  Changed: 0  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.03 sec)

mysql> quit
Bye

[root@localhost ~]# ps ux
root      4976  0.0  0.2  5328 1160 pts/1    S+   11:43   0:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables
[root@localhost ~]# kill -9 4976

[root@localhost ~]# /etc/init.d/mysqld start
Starting MySQL:  [  OK  ]
[root@localhost ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.20-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>

关键字:mysql 恢复 密码

责任编辑:黑客基地        



本文引用网址: 

mysql 恢复密码的相关文章
发表评论