文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>how to restore password of root for mysql

how to restore password of root for mysql

时间:2009-07-23  来源:zsgd

First things first. Log in as root and stop the mysql daemon. Now lets start up the mysql daemon and skip the grant tables which store the passwords.

1. killall mysqld

2. /usr/bin/mysqld_safe --skip-grant-tables       #(if  the mysql installed by rpm, )

You should see mysqld start up successfully. If not, well you have bigger issues. Now you should be able to connect to mysql without a password.

3.#mysql --user=root mysql

mysql>update user set Password=PASSWORD('aaa123') where user='root';
msyql>flush privileges;
msyql>exit;

Now kill your running mysqld, then restart it normally. You should be good to go. Try not to forget your password again.

相关阅读 更多 +
排行榜 更多 +
开局一个小兵最新版

开局一个小兵最新版

休闲益智 下载
火柴人联盟2腾讯qq登录版

火柴人联盟2腾讯qq登录版

体育竞技 下载
tsuki odyssey游戏(月兔冒险奥德赛)

tsuki odyssey游戏(月兔冒险奥德赛)

休闲益智 下载