Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

vsbenas
Copy link

@vsbenas vsbenas commented Mar 26, 2023

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!

Copy link
Owner

@nwoltman nwoltman left a 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.

Comment on lines +42 to +47
"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",
Copy link
Owner

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.

Comment on lines +50 to +51
const poolConfig = mysql.createPool(config).config;
super({config: poolConfig});
Copy link
Owner

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');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const mysql = require('mysql2');
const PoolConfig = require('mysql2/lib/pool_config');

@nwoltman nwoltman force-pushed the master branch 2 times, most recently from 7d235ad to ee6682e Compare March 30, 2023 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants