Configure primary and replica database in one string connection. #1098
Unanswered
nmartin-RatedPower
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So far in our Springboot application we configured the database connection string as follows
spring.datasource.url= jdbc-jdbc:aws-wrapper:mysql:replication://${host},${replica}/${database. name}?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false&autoReconnect=true&readOnlyPropagatesToServer=false&rewriteBatchedStatements=true
. We have changed to our connector and we would like to do exactly the same thing but when we do it we get the following error:The internal connection has changed since 'com.mysql.cj.jdbc.ClientPreparedStatement: {query} To ensure you are using the updated connection, please re-create Statement and ResultSet objects after failover and/or calling setReadOnly.
Any way to set up the replica on the same connection string as the primary database? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions