Discuz教程网

linux忘记mysql密码处理方法

[复制链接]
authicon dly 发表于 2011-9-11 21:19:33 | 显示全部楼层 |阅读模式
linux忘记mysql密码处理方法:

# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> update user set password=password('newpassword') where user='root';
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
enter password: <输入新设的密码newpassword>
mysql>



上一篇:解决mysql ERROR 1017:Can''t find file: ''/xxx.frm'' 错误
下一篇:MySQL 重装MySQL后, mysql服务无法启动
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 18:40

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表