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
Implements support for MYSQL_CONNECTION_STRING environment variable as an alternative to individual connection parameters. This is particularly useful for rotating credentials that expire frequently.
Features:
- Parse MySQL CLI-format connection strings
- Connection string takes precedence over individual env vars
- Support for -h/-P/-u/-p flags and long-form options
- Handles quoted values and complex passwords
- Documented as optional alternative in README
Addresses #35
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -502,6 +502,19 @@ For more control over the MCP server's behavior, you can use these advanced conf
502
502
-`MYSQL_PASS`: MySQL password
503
503
-`MYSQL_DB`: Target database name (leave empty for multi-DB mode)
504
504
505
+
#### Alternative: Connection String
506
+
507
+
For scenarios requiring frequent credential rotation or temporary connections, you can use a MySQL connection string instead of individual environment variables:
508
+
509
+
-`MYSQL_CONNECTION_STRING`: MySQL CLI-format connection string (e.g., `mysql --default-auth=mysql_native_password -A -hHOST -PPORT -uUSER -pPASS database_name`)
510
+
511
+
When `MYSQL_CONNECTION_STRING` is provided, it takes precedence over individual connection settings. This is particularly useful for:
512
+
- Rotating credentials that expire frequently
513
+
- Temporary database connections
514
+
- Quick testing with different database configurations
515
+
516
+
**Note:** For security, this should only be set via environment variables, not stored in version-controlled configuration files. Consider using the `prompt` input type in Claude Code's MCP configuration for credentials that expire.
517
+
505
518
### Performance Configuration
506
519
507
520
-`MYSQL_POOL_SIZE`: Connection pool size (default: "10")
0 commit comments