Chinaunix首页 | 论坛 | 博客
  • 博客访问: 403396
  • 博文数量: 67
  • 博客积分: 1742
  • 博客等级: 上尉
  • 技术积分: 753
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-15 01:54
文章分类

全部博文(67)

文章存档

2014年(1)

2013年(4)

2012年(1)

2011年(9)

2010年(29)

2009年(23)

我的朋友

分类: LINUX

2010-05-14 15:00:08

用于忘记root密码

[root@localhost init.d]# killall -TERM mysqld

[root@localhost init.d]# ps -ef | grep mysqld root 5633 5592 0 13:08 pts/1 00:00:00 grep mysqld


使用--skip-grant-tables启动mysql,就是启动mysql时候跳过授权表。

 

[root@localhost mysql]# mysql

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> 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('111222') where user='root';

Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql> exit

重启mysql即可使用新密码登录。


 

阅读(715) | 评论(0) | 转发(0) |
0

上一篇:ab测试

下一篇:grep查找网站挂马

给主人留下些什么吧!~~