zoukankan      html  css  js  c++  java
  • INSERT command denied to user

    问题分析:

    网站运行突然出现下面的 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、检查一下数据库是否满了,如果数据库满了没有空间后也会出现这种情况。

  • 相关阅读:
    SQL Server 存储过程
    String.format Tutorial
    第五次
    第四次
    第三次
    第一次作业
    第二次
    c/c++
    HelloWorld出现的问题
    Android系统架构
  • 原文地址:https://www.cnblogs.com/shindo/p/5991953.html
Copyright © 2011-2022 走看看