Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1126412
  • 博文数量: 188
  • 博客积分: 2267
  • 博客等级: 大尉
  • 技术积分: 1907
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-01 11:17
文章分类

全部博文(188)

文章存档

2016年(16)

2015年(16)

2014年(12)

2013年(32)

2012年(45)

2011年(67)

分类: Mysql/postgreSQL

2013-04-26 10:43:51

mysql 数据库root密码忘记以后,其实没有想象的那么麻烦,下边看看怎么解决这个问题。

# mysqld --skip-grant-tables

打开另一个窗口

mysql> use mysql;

mysql> update user set password = password("000000") where user = 'root' ;

mysql> flush privileges;


ps:

如果有以下提示,
[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
需要在/etc/my.cnf [mysqld]下加入一行

user-mysql

 操作完成后可以删除掉

参考:


阅读(1497) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~