zoukankan      html  css  js  c++  java
  • com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user 'xxxx'@''

    这两天项目一直在报这个错误消息:

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user 'xxxxx'@'xxx.xxx.xxx.xxx' for table 'xxxxxx'

    at sun.reflect.GeneratedConstructorAccessor54.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2283)
    at dao.UserDao.getNum(UserDao.java:236)
    at dao.UserDao.addUser(UserDao.java:43)
    at dao.UserDao.registUser(UserDao.java:160)
    at com.unicom.vac.bossagent.soap.SyncNotifySPSoapBindingImp                                                                                    l.orderRelationUpdateNotify(SyncNotifySPSoapBindingImpl.java:31)
    at com.unicom.vac.bossagent.soap.SyncNotifySPSoapBindingSke                                                                                    leton.orderRelationUpdateNotify(SyncNotifySPSoapBindingSkeleton.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)

    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)

    在windows 上测试没有问题,可是一移植到到linux上就报这个错了,

    解决方案:

    将黄色标记的那个账户权限改为全局或是将黄色标记的账户的权限可以select 表(黄色部分标记的表)


  • 相关阅读:
    Vscode 隐藏 工作区中的目录
    java 中 静态泛型方法书写
    Vscode 配置 maven debug
    vscode 配置 java utf-8 编码
    node.js 设置 淘宝 镜像
    vscode 注册表
    ESET Smart Security 6 – 免费60天(SG)
    WIN-8“内置管理员无法激活此应用”问题
    怎样更新PE内的工具
    使用Setup安装Windows8 RTM方法
  • 原文地址:https://www.cnblogs.com/keanuyaoo/p/3299497.html
Copyright © 2011-2022 走看看