SELECT command denied to user 'username'@'ip' for table 'user'错误处理
错误信息
<div class="code-tools">
<i class="theme-switch-btn"></i><i class="copy-btn"></i>
</div>
<pre class="pre codeblock" id="codeblock-op1-mla-6o9"><code class="hljs pgsql"><span class="hljs-keyword">SELECT</span> command denied <span class="hljs-keyword">to</span> <span class="hljs-keyword">user</span> <span class="hljs-string">'username'</span>@<span class="hljs-string">'ip'</span> <span class="hljs-keyword">for</span> <span class="hljs-keyword">table</span> <span class="hljs-string">'user'</span> </code></pre>
<div class="pre-scrollbar-track" style="display: none;width: 100%;height: 4px;margin-bottom: 16px;">
<div class="pre-scrollbar-thumb" style="height: 100%;background-color: #d7d8d9;position: relative;"></div>
</div>
</div>
排查步骤
- 测试RDS实例是否异常。可以使用mysql客户端连接到RDS,查询对应的表,如果可以正常查询,说明RDS没有问题。
- 用Wireshark软件抓包本机发出的实际请求:
- 在Wireshark界面中,选择捕获 > 选项,在输入页签选择连接RDS的内网网卡,在输出页签填写输出的文件名,然后单击开始。

- 复现问题,问题复现后,停止抓包。
- 在Wireshark界面中,选择捕获 > 选项,在输入页签选择连接RDS的内网网卡,在输出页签填写输出的文件名,然后单击开始。
- 打开生成的抓包文件,在显示过滤器里输入mysql,过滤出mysql协议,找到报错的包。

- 在报错的条目上单击右键,选择追踪流 > TCP流。

- 检查发送的SQL是否正确。
说明 上面的案例中,报错原因在于库名是fnb,而程序拼接出来的是hnb.user,数据库名拼接错误导致报错, 修正数据库名后问题解决。
SELECT command denied to user 'username'@'ip' for table 'user'错误处理的更多相关文章
- MySQL:select command denied to user for table 'proc'案例
使用EMS MySQL Manager Pro(3.4.0.1)连接MySQL 5.6.20时,报错:"SELECT command denied to user xxx@xxx.xxx.x ...
- mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts' when using LOCK TABLES
AutoMySQLBackup备份时,出现mysqldump: Got error: 1142: SELECT, LOCK TABLES command denied to user 'root'@' ...
- ERROR 1044 (42000) ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user'
ERROR: Access denied for user 'root'@'localhost' (using password: NO) 发现: mysql -u root@localh ...
- [phpmyadmin] phpmyadmin select command denied to user
phpmyadmin 在查看一个数据库中Table的数据的时候,会提示 select command denied to user 在Ubuntu下,我是使用重装Phpmyadmin的方式解决的 卸载 ...
- com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user’
Linux环境 Mysql+Hibernate command denied to user 错误 错误信息 如下: com.mysql.jdbc.exceptions.jdbc4.MySQLSynt ...
- com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user 'xxxx'@''
这两天项目一直在报这个错误消息: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to ...
- [已解决]#1142 - SELECT command denied to user ''@'localhost' for table 'pma_table_uiprefs'
症状:在phpmyadmin那边打不开表,提示 #1142 - SELECT command denied to user ''@'localhost' for table 'pma_table_ui ...
- SELECT command denied to user ''@'%' for column 'xxx_id' in table 'users_xxx' 权限问题
问题的原因是:最主要是权限的问题. 大概说下 ,我导数据库时提示错误:SELECT command denied to user ''@'%' for column 'xxx_id' in table ...
- Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: REFERENCES command denied to user 'nali'@'localhost' for table 'dbs'
按照教程 Install hive on Mac with Homebrew,在 mac 上安装 Hive 时, 最后执行 hive 命令后,出现错误: Exception in thread &qu ...
随机推荐
- 什么是PV UV
PV是网站分析的一个术语,用以衡量网站用户访问的网页的数量.对于广告主,PV值可预期它可以带来多少广告收入.一般来说,PV与来访者的数量成正比,但是PV并不直接决定页面的真实来访者数量,如同一个来访者 ...
- Spring Boot 学习填的坑一
1.关于springBoot自动扫描规则: SpringBoot项目的Bean装配默认规则是根据Application类所在的包位置从上往下扫描! "Application"类是指 ...
- swift 风骚的Guard语法
http://blog.csdn.net/pjk1129/article/details/48627153#0-qzone-1-64255-d020d2d2a4e8d1a374a433f596ad14 ...
- webpack配置vue项目
npm init 安装webpack,webpack-cli 新建src目录,在src目录下新建main.js
- 在MaxCompute中配置Policy策略遇到结果不一致的问题
背景信息: 本文以如下场景为基准进行编写,如下: 用户通过DataWorks-简单模式使用MaxCompute: 用户具有DataWorks默认角色,如DataWorks开发者角色: 用户通过cons ...
- 寻找 K8s 1.14 Release 里的“蚌中之珠”
摘要: K8s 1.14 发布了,Release Note那么长,我们该从何读起? 本文由张磊.心贵.临石.徙远.衷源.浔鸣等同学联合撰写. Kubernetes 1.14.0 Release 已经于 ...
- UVa 825【简单dp,递推】
UVa 825 题意:给定一个网格图(街道图),其中有一些交叉路口点不能走.问从西北角走到东南角最短走法有多少种.(好像没看到给数据范围...) 简单的递推吧,当然也就是最简单的动归了.显然最短路长度 ...
- Python从文件中读取内容,包含中文和英文
读取文件内容使要和保存文件时的格式一致 以UTF-8格式保存文件,如: 读取: 在.py起始行写入:#-*- coding:utf-8 -*- filename = raw_input(u" ...
- 17-2 orm单表操作和多表操作
参考:https://www.cnblogs.com/liwenzhou/p/8660826.html 一 ORM单表操作 1 增删改查 1. 查询 1. 查所有 models.Publisher. ...
- C# 设计模式 责任链
责任链模式是一种对象的行为模式.在责任链模式里,很多对象由每一个对象对其下家的引用而连接起来形成一条链.请求在这个链上传递,直到链上的某一个对象决定处理此请求.发出这个请求的客户端并不知道链上的哪一个 ...