您的位置首页生活百科

1045-access denied for user:'root@localhost'(Using password"YES)

1045-access denied for user:'root@localhost'(Using password"YES)

的有关信息介绍如下:

1045-access denied for user:'root@localhost'(Using password

步骤如下:

1:进入cmd,停止mysql服务:

   到mysql的安装路径启动mysql,在bin目录下使用mysqld-nt.exe启动,

2:执行:mysqld-nt --skip-grant-tables(窗口会一直停止)

3:然后另外打开一个命入令行窗口,执行mysql(或者直接进Mysql Command Line Cilent),此时无需输入密码即可进入。

>use mysql

>update user set password=password("新密码") where user="root";

>flush privileges;

>exit

4:使用任务管理器,找到mysqld-nt的进程,结束进程!

在重新启动mysql-nt服务,就可以用新密码登录了