gpt4 book ai didi

java - 无法更新数据库

转载 作者:行者123 更新时间:2023-11-29 14:05:13 26 4
gpt4 key购买 nike

我的APP:niaola.cloudfoundry.com java 1.6mysql5.1

选择代码

     update yy_desklist set isok=? where 
isok=? and timedrelease<=? Parameters: [1, 0, 1358929049]

错误日志:

      at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: UPDATE command denied to user 'uHHztgqtQsbK9'@
'172.30.49.102' for table 'yy_desklist' Query: update yy_desklist set
isok=? where isok=? and timedrelease<=? Parameters: [1, 0, 1358929049]
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:599)
at com.niaola.yangyun.db.QueryHelper.update(QueryHelper.java:300)
... 44 more
com.niaola.yangyun.db.DBException: java.sql.SQLException: UPDATE command denied
to user 'uHHztgqtQsbK9'@'172.30.49.102' for table 'yy_desklist' Query: update
yy_desklist set isok=? where isok=? and timedrelease<=?
Parameters: [1, 0,1358930631] at com.niaola.yangyun.db.QueryHelper.update(QueryHelper.java:302)
at com.niaola.yangyun.mvc.TempletsClass.getTimedList(TempletsClass.java:57)

最佳答案

用户“uHHztgqtQsbK9”似乎没有更新权限。

您需要使用管理员用户授予所需的权限。

GRANT  SELECT,INSERT,UPDATE,DELETE ON `db`.* TO 'user'@'host';

有关更详细的说明,您应该查阅 Mysql Documentation - Account Management Statements

关于java - 无法更新数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14480121/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com