Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL: Unknown system variable 'tx_read_only'

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?

like image 957
MigRome Avatar asked Feb 24 '26 23:02

MigRome


1 Answers

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.

like image 179
Mikko Maunu Avatar answered Feb 26 '26 12:02

Mikko Maunu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!