mysql修改密码后报错:ERROR 1045:Access denied for user:'root@localhost'(using password:YES)
2013-01-28 11:03
531 查看
重装了mysql,修改了密码,却发现无法连接,报错:Access denied for user 'root'@'localhost' (using password:YES)
查找资料后,大概是说没有给root设置权限,修复方法如下:
1、停止mysql服务,最简单办法:打开任务管理器--服务,关闭MySql。
2、建立一个txt文件mysql-init.txt,本次放在C:\下。
3、txt文件输入:SET PASSWORD FOR 'root'@'localhost' = PASSWORD('1');
//1为密码
4、运行--cmd,我的mysql安装在D:\。进入到D:\mysql\bin。
5、然后运行:D:\mysql\bin>mysqld-nt --init-file=C:\mysql-init.txt 。
6、如果提示“不是内部或外部...”等一大堆问题的,请将5、的那句复制到记事本,然后再复制到命令行下(右键--粘贴)
7、运行后,光标跳到下一行,没反应?
8、我没关机重启,而是注销
9、运行mysql,正常。
查找资料后,大概是说没有给root设置权限,修复方法如下:
1、停止mysql服务,最简单办法:打开任务管理器--服务,关闭MySql。
2、建立一个txt文件mysql-init.txt,本次放在C:\下。
3、txt文件输入:SET PASSWORD FOR 'root'@'localhost' = PASSWORD('1');
//1为密码
4、运行--cmd,我的mysql安装在D:\。进入到D:\mysql\bin。
5、然后运行:D:\mysql\bin>mysqld-nt --init-file=C:\mysql-init.txt 。
6、如果提示“不是内部或外部...”等一大堆问题的,请将5、的那句复制到记事本,然后再复制到命令行下(右键--粘贴)
7、运行后,光标跳到下一行,没反应?
8、我没关机重启,而是注销
9、运行mysql,正常。
相关文章推荐
- mysql 重新修改密码 以及ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)问题解决
- MySQL改密码报错:ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
- Linux MySQL修改密码时 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- mysql 错误解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- MySQL登录出现ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES) windows下的解决方案(忘记密码)
- Ubuntu下MySQL的“ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)”
- MySql错误1045 Access denied for user 'root'@'localhost' (using password:YES) windows下的解决方案(忘记密码)
- MySql 出现ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).问题解决方案
- mysql忘记密码了1045,解决MySql 数据库 提示:1045 access denied for user 'root'@'localhost' using password yes
- MySQl登录错误:ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
- xmapp中mysql密码修改问题 ERROR 1045 (28000): Access denied for user 'yangwan'@'localhost' (using password :
- Mysql登录提示1045 error:access denied for user 'root'@'localhost <using password: yes>
- mysql登录出现:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- mysql_ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- mysql报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- CentOS 7.4下解决登录MySQL时,ERROR 1045 (28000): Access denied for user root@localhost (using password: YES
- mysql修改密码后phpmyadmin 出现#1045 - Access denied for user &#39;root&#39;@&#39;localhost&#39; (using password: NO)
- Mysql连接错误:Access denied for user 'root'@'localhost' (using password:YES)解决方案以及WINDOWS下修改Mysql密码
- linux 下mysql 报 ERROR 1045 (28000): Access denied for user '-root'@'localhost' (using password: YES)