You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
install.md: add MySQL 8 auth compatibility note (flUseMySql2) #10
MySQL 8.0+ changed the default authentication plugin to caching_sha2_password. The older mysql npm package (used by davesql when flUseMySql2 is absent or false) only speaks mysql_native_password, so the server logs this error at startup and cannot reach the database:
ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client
This affects anyone running the current mysql:8 Docker image (which is 8.4.x), or any self-managed MySQL 8.0+ instance with default settings. MySQL 8.4 additionally removed mysql_native_password entirely, so there is no workaround on the MySQL side without recompiling or enabling a deprecated plugin.
Fix
davesql already supports mysql2, which handles caching_sha2_password natively. Setting one flag in config.json switches to it — no extra npm install needed, both packages ship with package.json:
A short note in the Create your database section of install.md, after the schema block:
MySQL 8 compatibility: MySQL 8.0+ uses caching_sha2_password by default, which the mysql npm package does not support. Add "flUseMySql2": true to the database block in config.json. Both mysql and mysql2 are already in package.json — no extra install needed.
Alternatively, davesql could default flUseMySql2 to true since mysql2 is a strict superset and MySQL 8 is now the norm.
Surfaced during a fresh install against mysql:8 (8.4.10) on Ubuntu, following the current install.md instructions. Issue formulated by Claude Code
Activity