为了账号安全,请及时绑定邮箱和手机立即绑定

spring boot 能查询,不能插入。

spring boot 能查询,不能插入。

www说 2018-07-02 08:08:16
ERROR 5460 --- [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.TransientDataAccessResourceException: ### Error updating database. Cause: java.sql.SQLException: Could not retrieve transaction read-only status from server### The error may involve cz.java.mapper.AdminMapper.addAdminNav-Inline### The error occurred while setting parameters### SQL: INSERT INTO admin_nav(`text`,state,iconCls,pid,href) VALUES(?,?,?,?,?)### Cause: java.sql.SQLException: Could not retrieve transaction read-only status from server; SQL []; Could not retrieve transaction read-only status from server; nested exception is java.sql.SQLException: Could not retrieve transaction read-only status from server] with root causejava.sql.SQLException: Unknown system variable 'tx_read_only'
查看完整描述

1 回答

?
慕盖茨4494581

TA贡献1850条经验 获得超11个赞

sql写错了,具体的错误是因为表的属性是只读的。修改一下表的状态

查看完整回答
反对 回复 2018-08-24
  • 1 回答
  • 0 关注
  • 1069 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信