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 ...
随机推荐
- Nginx教程(7) 正向代理与反向代理【总结】 (转)
1.前言 最近工作中用到反向代理,发现网络代理的玩法还真不少,网络背后有很多需要去学习.而在此之前仅仅使用了过代理软件,曾经为了访问google,使用了代理软件,需要在浏览器中配置代理的地址.我只知道 ...
- python 通过.pth文件修改搜索路径
- Add Binary字符数字相加,字符串合成
Given two binary strings, return their sum (also a binary string). For example,a = "11"b = ...
- 解决:"UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position"错误
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/Haiyang_Duan/article/ ...
- mysql设置text字段为not null,并且没有默认值,插入报错:doesn't have a default value
一.问题描述 在往数据库写入数据的时候,报错: '字段名' doesn't have a default value 本来这个错误是经常见到的,无非就是字段没有设置默认值造成的.奇怪的是,我这边报错的 ...
- [java]网上商城错误集锦 2016-05-08 21:49 499人阅读 评论(32) 收藏
网上商城敲到了第三天,马上就要踏入第四天啦,不过敲得这几天,学习到了不少东西,也接触了很多新东西,当然,遇到最多的,就是各种bug!下面总结一下自己遇到的这些bug. 一.时间获取不到 这个bug起源 ...
- linux下安装使用MySQL 以及 python mysqldb 遇到的问题
一.安装mysql sudo apt-get install mysql-client-core-5.5 然后会出现: ERROR 2002 (HY000): Can't connect to loc ...
- python isinstance和issubclass,区分方法和函数,反射
一.isinstance和issubclass 1.isinstance class Animal: def eat(self): print('刚睡醒吃点儿东西') class Cat(Animal ...
- python 空值(NoneType)
- 模板—LCT
#include<iostream> #include<cstring> #include<cstdio> #define LL long long using n ...