首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

<转载>mysql access denied for user root'@localhost' using password:NO 且 没法命令

2012-08-26 
转载mysql access denied for user root@localhost using password:NO 且 无法命令行登陆的情况window

<转载>mysql access denied for user root'@localhost' using password:NO 且 无法命令行登陆的情况
windows下忘了Mysql管理密码的方法

cmd里执行命令如下:

net stop mysql (终止mysql进程)
mysqld-nt -uroot --skip-grant-tables & (以不验证密码的方式启动mysql)
mysql -uroot (用root登录mysql)

接下来就是mysql的命令行了

mysql> update mysql.user set password=PASSWORD('您要设置的新密码') where User='root';
mysql> flush privileges; (刷新权限表,目的是为了让上一句确实生效)
mysql> quit (离开mysql命令行,回到cmd)

然后,再在cmd里:

net start mysql (重启mysql)

热点排行