in ACF2021, does it support the MySQL mysql-connec...
# cfml-general
s
in ACF2021, does it support the MySQL mysql-connector-j-9.3.0.jar driver to a 5.7 database? It seems to work fine in 2023, but when I tried in 2021 I'm getting a random error in my Application.cfc about halfway down - before any DSNs are specified. The DSN validates ok in the admin. Before I go chasing this down just wanted to see if this was a driver issue, or something else popped up. The URL is
dbc:mysql://[ip]:[port]/[db name]
and the Driver Class is
com.mysql.jdbc.Driver
, and Driver Name is
mysql-connector-j-9.3.0.jar
.
j
If you look at the MySQL connector docs - they dropped 5x support in 8.3 https://dev.mysql.com/doc/relnotes/connector-j/en/news-8-2-0.html This release can be used against MySQL Server version 5.7 and later https://dev.mysql.com/doc/relnotes/connector-j/en/news-8-3-0.html This release can be used against MySQL Server version 8.0 and later. That said I've been using newer versions with 5.x in our development environment but something did seem to finally break in one of the latest 9.x
s
Thanks Jim - I'll play around and find the newest that works.
j
FYI - class name also changed somewhere along the way (also mentioned in the docs) - think in 8.x "class": "com.mysql.cj.jdbc.Driver",
s
Adobe could maybe update this page as step 7 still has
com.mysql.jdbc.Driver
b
@Steve Logan: "The URL is `dbcmysql//[ip]:[port]/[db name]`" Typo. Obviously: "The URL is `jdbcmysql//[ip]:[port]/[db name]`"
Example (implementation in Application.cfc):
this.datasources["MySQLTestDSN"] = {
class: "com.mysql.cj.jdbc.Driver"
, url: "jdbc:<mysql://localhost:3306/cfmx_db?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true>"
, username: "root"
, password: "my_MySQL_pwd"
};
s
I have the driver working in ACF2023 (mysql-connector-j-9.3.0.jar). Just had this error pop up that must be driver related.
Field [column name] could not be cast to numeric for value "NO".
The field isn't included in the form, and the default in the db is 0 (tiny int). Something in the driver appears to be trying to use "NO". I'm guessing there's some sort of connection string change I can use to revert to the older behavior?