忘记mysql密码
停止mysql服务 /etc/init.d/mysqld stop
终止Mysql进程 killall -TERM mysqld
安全模式启动Mysql
[root@localhost ~]# /usr/bin/mysqld_safe –skip-grant-tables &
mysql -p 回车直接进
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set password=password(‘新密码’) where user=’root’;
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> quit
Bye
[root@localhost ~]# service mysqld restart 重启mysql
用root的新密码进mysql
[root@localhost ~]# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
我昨天也忘了密码了,进不去…..方法同上,成功重置^_^
我是笨猫,请问你的链接是否出售啊