user3386284
user3386284

Reputation: 63

Does Coldfusion 2021 support connections to MySQL 8.0? (AWS RDS MySQL Community Server)

We have a MySQL Community server packaged as an AWS RDS instance. We had been running MySQL 5.7, but AWS is forcing an upgrade to 8.0 unless you pay an extra charge.

We have a datasource that works fine for 5.7, using the "MySQL" driver from the dropdown, but when we try to connect to an upgraded snapshot running MySQL 8.0.35, we get:

Could not create connection to database server. Attempted reconnect 3 times. Giving up.

Stack Trace:
java.lang.NullPointerException
 at com.mysql.jdbc.ConnectionImpl.getServerCharacterEncoding(ConnectionImpl.java:3307)
 at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1985)
 at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1911)
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288)
 at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506)
 at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2344)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2326)
 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
 at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
 at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
 at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
 at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:666)
 at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
 at java.base/java.lang.Thread.run(Thread.java:834)

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException

The datasource that worked for 5.7 but not for 8.0 also had connection string useUnicode=true&characterEncoding=utf8

Keeping that or removing it when trying to connect to 8.0 appears to have no effect- same error.

I also tried creating a completely new datasource- same issue.

Any ideas? Thanks for your time and attention.

Upvotes: 1

Views: 133

Answers (0)

Related Questions