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 ...
随机推荐
- js(jquery)鼠标移入移出事件时,出现闪烁、隐藏显示隐藏显示不停切换的情况
<script> $(".guanzhu").hover(function(){ $(".weixinTop").show(); },functio ...
- VS2017 打包成exe
在项目的解决方案 右键→ 新建项目 后出现如下选择 (如果没有找到,请在联机中搜索 visual studio installer 并安装) 选择项目类型 Setup Project,并输入名称, ...
- win7 powershell版本过低问题
那台win8系统的笔记本电脑 硬盘坏掉后 在win7系统的台式机上使用 vagrant up 提示版本过低 The version of powershell currently installed ...
- Linux配置redis开机启动(CentOS 7)
https://blog.csdn.net/qq_31803503/article/details/79246205 本次配置linux版本是CentOS 7 首先将 redis-3.2.3/uti ...
- yum方式安装MySQL【转】
在CentOS7中默认安装有MariaDB,这个是MySQL的分支,但为了需要,还是要在系统中安装MySQL,而且安装完成之后可以直接覆盖掉MariaDB. 另外至2919年5月4号, 默认安装的my ...
- 开窗函数over()中partition by关键字解析
partition by关键字是分析性函数的一部分,它和聚合函数不同的地方在于它能返回一个分组中的多条记录,而聚合函数一般只有一条反映统计值的记录,partition by用于给结果集分组,如果没 ...
- char和achar互转
#pragma once#include "stdafx.h" #ifndef _Convert_H_#define _Convert_H_ //定义转换类class Conver ...
- BZOJ 4551树题解
好吧,洛谷的数据比较水暴力就可以过....(而且跑到飞快) 不过(BZ水不过去)还是讲讲正规的做法. 其实一眼可以看出可以树剖,但是,码起来有点麻烦. 其实有一种更简单的离线做法. 我们很容易联想到并 ...
- AtCoder Grand Contest 019 B - Reverse and Compare【思维】
AtCoder Grand Contest 019 B - Reverse and Compare 题意:给定字符串,可以选定任意i.j且i<=j(当然i==j时没啥卵用),然后翻转i到j的字符 ...
- 阿里云MaxCompute 2019-4月刊
摘要: 4月新功能发布,精彩技术好文推荐,5月线上线下活动抢先知道,尽在4月刊. 您好,MaxCompute 2019.4月刊为您带来产品最新动态和丰富的产品技术内容,欢迎阅读. 导读 [功能发布]4 ...