Error trying to use Prepared Statements - MySQL

Trying to execute a prepared statement:


SELECT [...] INTO @prepared
FROM [...] WHERE [...]

This part executes fine.

PREPARE stmt FROM @prepared;

This part also executes fine.




This returns an error back:

Could not retrieve transation read-only status server


The first thing I found was this answer from Stackoverflow. They mention that this JDCB option should be set. Locally, I have it setup this way (using Datagrip), and it works.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 6 mths agoLast active
  • 139Views
  • 1 Following

Create A New Discussion

Share your thoughts