I’m working on a Java Swing-based application+ Hibernate+Mysql+Spring. When I test CRUD operations, I don’t have problems with read, but in insert statements system shows the message:
Unknown system variable `tx_read_only`
I have the last version of MySQl
- Hibernate 4
- Java annotations
Can you tell me which is the problem to solve now?
Advertisement
Answer
Just throwing rocks to the darkness, but one possibility could be:
- Variable tx_read_only was introduced in MySQL 5.6.5.
- Probably MySQL version is older than that, but Connector/J tries to use new variable anyway.
- According release notes, support for this variable came in Connector/J 5.1.23.
==> maybe version older than 5.1.23 will work, or this is the bug that is fixed in version newer than that.