打开Navicat Premium连接mysql出现1045-Access denied for user 'root'@ 'localhost'(using password:YES)错误解决方法
2020-02-04 19:54
841 查看
打开Navicat Premium连接出现错误
此错误是指用户“root”@本地主机的访问被拒绝,原因时用户密码出错
解决方法:
- 找到mysql安装路径下的my.ini文件
2.在记事本中打开该文件,并在【mysqld】下方添加skip-grant-tables(注意一定是这个【mysqld】下方的位置)
注:skip-grant-tables这段代码是作为启动参数的作用,mysql服务器不加载权限判断,任何用户均可访问
3.ctrl+s保存,然后WIN+R,然后输入cmd
4.输入mysql -u root -p(用来连接服务器)然后直接回车,不用输入密码
5.输入use mysql
6.输入update user set password=password(“root”)where user=root;(括号里的是你想要改的密码,我自己设的是root作为密码)
7.输入flush privileges;(刷新数据库)
8.打开my.ini,把刚刚添加的语句删除,保存后,此时重新打开navicat premium连接数据库就可以正常连接了。
若还有此问题,把刚刚删除的再添上,重启mySql再测试即可(WIN+R输入services.msc)
- 点赞 1
- 收藏
- 分享
- 文章举报
相关文章推荐
- 连接mysql数据库出现错误:1045-Access denied for user 'root'@'localhost' (using password:YES) 解决方法
- MySql 1045 access denied for user 'root'@'localhost' using password yes错误解决方法
- 解决Navicat for MySQL打开连接时出现错误提示1045 access denied for user 'root'@'localhost' (using password yes)的问题
- Linux下连接Mysql出现:Access denied for user 'root'@'localhost' (using password:YES)的解决方法
- 解决用Mysql 使用navicate远程连接数据库出现1045 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
- jdbc与mysql的连接错误解决——“Connect failed: Access denied for user 'root'@'localhost' (using password: YES)”
- 如何解决PHP连接MySQL时出现的Access denied for user 'root' @ 'localhost'(using password :YES)
- mysql 错误解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解决方法
- 关于Navicat mysql连接出现1045 access denied for user 'root'@'localhost' using password: yes
- mysql出现1045 - Access denied for user 'root'@'localhost' (using password: YES)错误
- mysql中Access denied for user 'root'@'localhost' (using password:YES) 错误的解决方法
- 解决Navicat连接的时候出现了1045 -Access denied for user'root'@'ip'(using password :yes)--mysql
- MySql 出现ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).问题解决方案
- Mac安装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 解决办法