问题分析:

网站运行突然出现下面的 MySQL 错误:

645297 [http-88-13] ERROR com.mes.cart.dao.impl.CartDAOImpl -  CartDAOImpl -----> addCart
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.Nest
edSQLException:
--- The error occurred while applying a parameter map.
--- Check the member-cart.addCart-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: INSERT command denied to user 'shindo'@'*.*.*.219' for table 't_cart'
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:98)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203)
at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:364)
at com.mes.cart.dao.impl.CartDAOImpl.addCart(CartDAOImpl.java:54)
at com.mes.cart.service.impl.CartServiceImpl.addCart(CartServiceImpl.java:64)
at com.mes.cart.manager.impl.CartManagerImpl.addCart(CartManagerImpl.java:61)
at com.mes.cart.action.CartAction.perform(CartAction.java:64)
at com.mes.framework.core.action.impl.ApplicationAction.perform(ApplicationAction.java:83)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

解决办法:

1、请检查您的 MySQL 帐号是否有相应的权限。

2、检查一下应用下的 config 配置文件中的连接数据库的帐号是否正确。

3、检查一下数据库是否满了,如果数据库满了没有空间后也会出现这种情况。

INSERT command denied to user的更多相关文章

  1. Mysql 用户权限管理--从 xxx command denied to user xxx

    今天遇到一个mysql 权限的问题,即标题所述  xxx command denied to user xxx,一般mysql 这种报错,基本都属于当前用户没有进行该操作的权限,需要 root 用户授 ...

  2. [已解决]#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 ...

  3. 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 ...

  4. 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'@' ...

  5. 错误解决:SharePoint Designer 2010编辑后,出现数据源控件未能执行插入命令,data source control failed to execute the insert command

    打了SharePoint 2010 最新的SP 2的补丁,但是使用SharePoint Designer 2010 定义任何一个列表的“插入视图”时,总是出现标题那样的错误: 数据源控件未能执行插入命 ...

  6. TRIGGER command denied to user 'root'@'LAPTOP-M7KUFN86' for table 'growtest' | Table 'MyDatabase.tmpIdentity_Invites' doesn't exist

    是因为创建表的时候,用户权限不够 NaviCat for Mysql 用这个工具打开MYSQL 在用户 下找到 root@% 这个用户,双击打开 设置服务器权限,最后两个权限勾上就OK 了,需要把MY ...

  7. 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 ...

  8. [phpmyadmin] phpmyadmin select command denied to user

    phpmyadmin 在查看一个数据库中Table的数据的时候,会提示 select command denied to user 在Ubuntu下,我是使用重装Phpmyadmin的方式解决的 卸载 ...

  9. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user’

    Linux环境 Mysql+Hibernate command denied to user 错误 错误信息 如下: com.mysql.jdbc.exceptions.jdbc4.MySQLSynt ...

随机推荐

  1. 【转】app瘦身

    iPhone经过这几年的发展,已经发生了很大的变化,例如屏幕变得更加多样,尺寸更多,内存变得更大,CPU的架构也在变化.伴随着iPhone的变化,iOS也在变化,例如AutoLayout.size c ...

  2. sharepoint2013小技巧

    一.创建基于经典认证的应用程序 New-SPWebApplication -Name "Contoso Internet Site" -ApplicationPool " ...

  3. DNN - Modules - QR Code Generator

    Dotnetnuke 平台上的二维码模块.支持DNN 7.x平台的安装 QR码(快速响应码)是二维条形码.随着移动设备市场正以快速的步伐,QR码正在成为非常重要的营销工具.与移动电话或平板电脑的扫描, ...

  4. 几种常用的Java数据源解决方案

    http://blog.163.com/qqabc20082006@126/blog/static/22928525201041944847653/

  5. 策略模式Strategy(对象行为型)

    原文地址:http://blog.csdn.net/hguisu/article/details/75582491.策略模式:定义一系列的算法,把每一个算法封装起来, 并且使它们可相互替换.本模式使得 ...

  6. ajax调用action后返回list给list.jsp,显示为xml文档

    struts2中使用的是map来保存数据的,所以这里绑定的值是key和value1 <?xml version="1.0" encoding="UTF-8" ...

  7. 武汉科技大学ACM:1004: Lake and Island

    Problem Description 北园孩子的专属福利来啦~学校从北区宿舍到湖心岛修建了一条通道让北园的同学们可以上去一(kuang)同(xiu)玩(en)耍(ai),这一天,IcY向ahm001 ...

  8. QT5-控件-QProgressBar-进度条-用来做下载进度,文件读取进度还不错

    #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QProgressBar> ...

  9. mahout学习-1

    一. 安装软件 需要安装如下文件: java, Eclipse, Maven,Hadoop,mahout 二. 推荐系统简介 每天,我们都会对一些事物表达自己的看法,喜欢,或不喜欢,或不在乎.这些都在 ...

  10. kafka教程

    一.理论介绍(一)相关资料1.官方资料,非常详细:   http://kafka.apache.org/documentation.html#quickstart2.有一篇翻译版,基本一致,有些细节不 ...