修改MySQL root 密码

Saturday, January 30, 2010

在忘记MySql root用户的密码时,可通过如下方法重新设定: 1、关闭mysql服务器 2、用下面的命令启动mysql,跳过权限检测表

mysqld_safe --skip-grant-tables&;

3、用空密码登入

mysql -u root

4、修改mysql root密码

mysql> update mysql.user set password=PASSWORD('new_password') where user='root';
mysql> flush privileges;
mysql> quit

5、重新启动mysql服务器

This entry was tagged MySQL

comments powered by Disqus

© 2009-2013 lxneng.com. All rights reserved. Powered by Pyramid

go to Top