[PR #3991] [MERGED] swap mysql library and knex client for mysql2 #3786

Closed
opened 2026-02-26 08:31:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/3991
Author: @nlynzaad
Created: 9/10/2024
Status: Merged
Merged: 10/11/2024
Merged by: @jc21

Base: developHead: develop_mysql2


📝 Commits (1)

  • 48a9f5f swop mysql library and knex client for mysql2

📊 Changes

5 files changed (+73 additions, -24 deletions)

View changed files

📝 backend/config/default.json (+1 -1)
📝 backend/knexfile.js (+2 -2)
📝 backend/lib/config.js (+1 -1)
📝 backend/package.json (+1 -1)
📝 backend/yarn.lock (+68 -19)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NginxProxyManager/nginx-proxy-manager/pull/3991 **Author:** [@nlynzaad](https://github.com/nlynzaad) **Created:** 9/10/2024 **Status:** ✅ Merged **Merged:** 10/11/2024 **Merged by:** [@jc21](https://github.com/jc21) **Base:** `develop` ← **Head:** `develop_mysql2` --- ### 📝 Commits (1) - [`48a9f5f`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/48a9f5f9db2e58778cda541193dde2f9e57407e5) swop mysql library and knex client for mysql2 ### 📊 Changes **5 files changed** (+73 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `backend/config/default.json` (+1 -1) 📝 `backend/knexfile.js` (+2 -2) 📝 `backend/lib/config.js` (+1 -1) 📝 `backend/package.json` (+1 -1) 📝 `backend/yarn.lock` (+68 -19) </details> ### 📄 Description 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](https://www.npmjs.com/package/mysql) library. This library unfortunately does not support the caching_sha2_password authentication method. [mysql2](https://www.npmjs.com/package/mysql2) supports the new caching_sha2_password methods and "is mostly API compatible with [Node MySQL](https://github.com/mysqljs/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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 08:31:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#3786
No description provided.