MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES) windows下的解决方案(忘记密码)
2017-03-21 13:05
1276 查看
MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES)
windows下的解决方案(忘记密码)
1、进入管理员控制台停止mysql服务:net stop mysql;2、进入mysql的安装路径,如我的安装路径为C:\Program Files\MySQL\MySQL Server 5.5,打开my.ini文件,找到[mysqld],在该行下面添加 skip_grant_tables,也就是通知mysql,在登陆的时候跳过密码的验证,保存后退出;
3、重启mysql服务:net start mysql;
4、在控制台输入:mysql -u root -p 弹出输入密码的时候,只需要回车即可进入mysql;
5、重设用户root的密码,输入:UPDATE user SET Password=PASSWORD(‘你的新密码') where USER='root';
6、退出mysql,输入:quit;
7、停止mysql服务,在管理员控制台输入:net stop mysql ;
删除C:\Program Files\MySQL\MySQL Server 5.5\my.ini文件中刚添加的skip_grant_tables这一行;
保存后重启mysql服务,输入:net start mysql;
8、用新密码登陆。
原文地址:http://www.cnblogs.com/parryyang/p/5098149.html
我出现的问题为用户错误,采用上面的方法。
然后 在命令行 user mysql;
update user set user=" " where user = "";
相关文章推荐
- MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES) windows下的解决方案(忘记密码)
- Mysql连接错误:Access denied for user 'root'@'localhost' (using password:YES)解决方案以及WINDOWS下修改Mysql密码
- mysql忘记密码了1045,解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案
- windows环境下mysql报:1045 access denied for user 'root'@'localhost' using password YES错误解决办法
- windows mysql提示:1045 access denied for user 'root'@'localhost' using password yes 解决方案
- navicat(MySql)错误1045 Access denied for user 'root'@'localhost' (using password:YES)
- MySql 1045 access denied for user 'root'@'localhost' using password yes错误解决方法
- windows mysql提示:1045 access denied for user'root'@'localhost' using password yes
- mysql 重新修改密码 以及ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)问题解决
- mysql 错误解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- mysql错误 Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- mysql出现1045 - Access denied for user 'root'@'localhost' (using password: YES)错误
- 关于MySql登录出现错误代码 1045 Access denied for user 'root'@'localhost' (using password:YES)
- MySQl登录错误:ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
- mysql修改密码后报错:ERROR 1045:Access denied for user:'root@localhost'(using password:YES)
- mysql出现:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 错误
- linux下连接windows mysql的错误:Access denied for user 'root'@'localhost' (using password: YES)
- 【MySQL】错误1045: Access denied for user 'root'@'localhost' (using password: YES)
- 【数据库】mysql(1045 access denied for user 'root'@'localhost' using password yes)的解决方案