-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
When connecting Cube.js to a MySQL 9.x server, the connection fails with the following error:
Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
This happens because MySQL 9+ no longer supports mysql_native_password authentication, while Cube.js still tries to use it.
To Reproduce
Steps to reproduce the behavior:
Install MySQL 9.4.0 (or any MySQL 9.x)
Configure a database with default authentication (caching_sha2_password)
Set up Cube.js with the MySQL driver
Start Cube.js
Expected behavior
Cube.js should successfully connect to MySQL 9.x using caching_sha2_password authentication.
Actual behavior
Cube.js throws an authentication error (ER_NOT_SUPPORTED_AUTH_MODE) because it attempts to use mysql_native_password, which is deprecated/removed in MySQL 9+.
Environment
Cube.js version: v1.3.74
MySQL version: 9.4.0 for macOS (arm64, Homebrew build)
Node.js version: v22.18.0
OS: macOS 15.4 (arm64, Apple Silicon)
Additional context
MySQL 9.x removed support for mysql_native_password.
Cube.js (via its MySQL driver) should ideally support caching_sha2_password out of the box.
Workarounds like downgrading MySQL or altering user authentication are not sustainable long-term.
Proposed Solution: Update Cube.js’s MySQL driver to support caching_sha2_password authentication, which is now the default and only supported mechanism in MySQL 9+.
