-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update library to mysql2 #6
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized CI didn't run because Travis CI changed since I last had any updates happy to this package. I'm going to work on migrating to GitHub Actions.
"grunt-jsdoc-to-markdown": "^6.0.0", | ||
"grunt-mocha-istanbul": "^5.0.2", | ||
"grunt-mocha-test": "^0.13.3", | ||
"istanbul": "^0.4.5", | ||
"jit-grunt": "^0.10.0", | ||
"mocha": "^7.0.1", | ||
"mocha": "^10.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind undoing these? I know the devDepencies are out of date, but these sorts of changes should be done separately.
const poolConfig = mysql.createPool(config).config; | ||
super({config: poolConfig}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you're trying to be less hacky, but this is going to create an extra, unused pool. This code doesn't need to change if you do the suggestion I'll post above.
const PoolConfig = require('mysql/lib/PoolConfig'); | ||
const SqlString = require('mysql/lib/protocol/SqlString'); | ||
const {Pool} = require('mysql2'); | ||
const mysql = require('mysql2'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const mysql = require('mysql2'); | |
const PoolConfig = require('mysql2/lib/pool_config'); |
7d235ad
to
ee6682e
Compare
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
The original mysql library is outdated (last update 3 years ago) and it doesn't support modern MySQL servers. This change updates the library to use mysql2.
Also - thanks for building this library!