NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.61k stars 2.63k forks source link

swap mysql library and knex client for mysql2 #3991

Closed nlynzaad closed 1 week ago

nlynzaad commented 1 month ago

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[bot] commented 1 month ago

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 commented 1 week ago

Thanks for testing :)