spring boot 能查询,不能插入。

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 cause

java.sql.SQLException: Unknown system variable 'tx_read_only'

www说
浏览 1077回答 1
1回答

慕盖茨4494581

sql写错了,具体的错误是因为表的属性是只读的。修改一下表的状态
打开App,查看更多内容
随时随地看视频慕课网APP