Skip to content

swap mysql library and knex client for mysql2 #3991

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

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

nlynzaad
Copy link
Contributor

@nlynzaad nlynzaad commented Sep 10, 2024

Since MySQL 9 the use of the native_password plugin is no longer supported and caching_sha2_password is now required.

Currently npm makes use of the mysql library. This library unfortunately does not support the caching_sha2_password authentication method.

mysql2 supports the new caching_sha2_password methods and "is mostly API compatible with Node MySQL and supports majority of features"

This PR changes the mysql library for mysql 2 and updates the knex configs to use mysql2. This closes issue #3287

Basic tests against a new and existing npm database (updated to mysql 9) worked flawlessly.

I might be doing something wrong, but I was not able to get the scripts/test_dev.sh to run as it was seeking a taskfile in the dev container.

@nginxproxymanagerci
Copy link

Docker Image for build 1 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-3991

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@jc21
Copy link
Member

jc21 commented Oct 11, 2024

Thanks for testing :)

@jc21 jc21 merged commit 02a7b43 into NginxProxyManager:develop Oct 11, 2024
1 check passed
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.

2 participants