mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
Added MySQL-specific environment variables with proper precedence: **New MySQL Environment Variables:** - `MYSQL_HOST` (defaults to `localhost`) - `MYSQL_PORT` (defaults to `3306`) - `MYSQL_USER` (with fallback to `$USER`) - `MYSQL_PASSWORD` (defaults to empty) - `MYSQL_DATABASE` (defaults to `mysql`) - `MYSQL_URL` (primary connection URL) - `TLS_MYSQL_DATABASE_URL` (SSL/TLS connection URL) **Enhanced TLS Support:** - Added `TLS_MYSQL_DATABASE_URL` for MySQL TLS connections - Enhanced `TLS_DATABASE_URL` to work with MySQL protocol detection - All TLS URLs automatically enable SSL mode **Environment Variable Precedence:** - MySQL-specific env vars (e.g., `$MYSQL_USER`) override generic ones (e.g., `$USER`) - Environment variable names override URL protocols for semantic intent - Proper URL precedence: `MYSQL_URL` > `DATABASE_URL` > `TLS_MYSQL_DATABASE_URL` > `TLS_DATABASE_URL` **Comprehensive Testing:** - 23 adapter precedence tests covering all MySQL env vars - Tests for TLS URL handling and protocol detection - Tests for env var name precedence over protocols - All existing tests (241 total) continue to pass This brings MySQL environment variable support in line with PostgreSQL, providing a complete and intuitive configuration experience. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>