LuManager忘记mysql的root用户密码怎么办?

作者:我就是个世界 发表于:2011-11-18
首先看你的LuManager是否还能运行, 如果运行正常,可以在/usr/local/LuManager/Conf/config.php设置里看到。。直接找回!

如果LuManager不能运行,或者报错:
[code]Access denied for user 'root'@'localhost' (using password: YES)[/code]
那么需要执行以下操作,重置root密码:[separator]
[code]
#停止mysql
mysql-stop
#用--skip-grant-tables参数启动mysql
/usr/local/mysql/bin/mysqld_safe --user=lu_mysql --datadir=/home/mysql_data --skip-grant-tables &
#由于使用了--skip-grant-tables,可不用密码直接登陆mysql
/usr/local/mysql/bin/mysql
#切换到mysql数据库
use mysql
#更新密码为zijidelu
update user set password=password("zijidelu") where user="root";
#刷新权限
flush privileges;
到此,密码更改完成,按ctrl+c退出,然后执行mysql-restart重启mysql
[/code]
此时你的LuManager还是不能运行,会报错:
[code]Access denied for user 'root'@'localhost' (using password: YES)[/code]
你应该去/usr/local/LuManager/Conf/config.php中修改root密码为你刚刚设置的root密码即可!

分享:

扫一扫在手机阅读、分享本文

请发表您的评论