前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >Navicat远程管理Mysql数据库连接报错1045的解决办法

Navicat远程管理Mysql数据库连接报错1045的解决办法

原创
作者头像
好派笔记
修改2021-09-15 17:43:15
修改2021-09-15 17:43:15
1.5K0
举报
文章被收录于专栏:好派笔记好派笔记

每次在LINUX上安装好MYSQL数据库服务器后,利用Navicat管理时,总是提示下列错误:

navicat远程连接报错1045 access denied for user'root'@'ip'(using pasword:yes)

【解决办法如下】:

在本地或利用SSH登录mysql数据库,输入以下两条命令。

  1. GRANT ALL PRIVILEGES ON . TO'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION;  
  2. flush privileges;  

注:这里*****表示数据库密码,在第二步中也可以通过重启数据库服务来实现。

具体操作如下示例:

  1. [root@ITCMDB ~]# mysql -u root -p
  2. Enter password:   
  3. Welcome to the MySQL monitor.  Commands end with ; or \g.  
  4. Your MySQL connection id is 233  
  5. Server version: 5.7.22 MySQL Community Server (GPL)  
  6. Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.  
  7. Oracle is a registered trademark of Oracle Corporation and/or its  
  8. affiliates. Other names may be trademarks of their respective  
  9. owners.  
  10. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  
  11. mysql> GRANT ALL PRIVILEGES ON *.* TO'root'@'%' IDENTIFIED BY 'ABDd123469#' WITH GRANT OPTION;
  12. Query OK, 0 rows affected, 1 warning (0.00 sec)  
  13. mysql> flush privileges;  
  14. Query OK, 0 rows affected (0.00 sec)  
  15. mysql>   

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档