“Ignoring invalid configuration option passed to Connection: sql_mode. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration option to a Connection”
This is my sequelize configuration. The issue seems to stem from dialectOptions
and sql_mode
. If I comment out sql_mode
the warning won’t be thrown.
I tried only specifying “STRICT_TRANS_TABLE” and I still got the warning.
According to the mysql documentation, it shouldn’t be invalid.
export const sequelize = new Sequelize({
database: DATABASE,
username: USERNAME,
password: PASSWORD,
host: HOST,
dialect: "mysql",
dialectOptions: {
sql_mode: "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
},
});
“sequelize”: “^6.37.3”,
“sequelize-typescript”: “^2.1.6”,
These are my versions, and I’m using phpMyAdmin as the UI on the off chance it’s relevant.