Closed as not planned
Description
A Node Express server using this package (via express-mysql-session
, which is confirmed to use this package at v3.10.2) crashes periodically due to reliance upon an authentication plugin that has been deprecated by MySQL.
Crashes occur randomly, not upon initial connection or when attempting to send queries:
/node_modules/express-mysql-session/node_modules/mysql2/promise.js:356
const localErr = new Error();
^
Error: Plugin 'mysql_native_password' is not loaded
at PromisePool.query (/node_modules/express-mysql-session/node_modules/mysql2/promise.js:356:22)
at /node_modules/express-mysql-session/index.js:384:30
at new Promise (<anonymous>)
at MySQLStore.query (/node_modules/express-mysql-session/index.js:381:10)
at /node_modules/express-mysql-session/index.js:372:16 {
code: 'ER_PLUGIN_IS_NOT_LOADED',
errno: 1524,
sql: undefined,
sqlState: 'HY000',
sqlMessage: "Plugin 'mysql_native_password' is not loaded"
}
MySQL documentation at https://dev.mysql.com/doc/refman/8.4/en/native-pluggable-authentication.html indicates:
Note
Themysql_native_password
authentication plugin is deprecated as of MySQL 8.0.34, disabled by default in MySQL 8.4, and removed as of MySQL 9.0.0.