feat: Add MySQL connection string support (Issue #35) #92
+177
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements support for
MYSQL_CONNECTION_STRINGenvironment variable as an alternative to individual connection parameters. This addresses Issue #35 and is particularly useful for organizations with rotating credentials that expire frequently (e.g., hourly).Changes
Core Implementation
Connection String Parser (
src/utils/index.ts):-h,-P,-u,-p,-S) and long options (--host,--port, etc.)Configuration Integration (
src/config/index.ts):MYSQL_CONNECTION_STRINGenvironment variable supportDocumentation
README.mdwith connection string option (positioned as alternative, not primary method).env.distwith connection string exampleCode Quality
Testing
Tested with sample connection string:
Successfully parses all connection parameters including complex usernames and passwords.
Use Cases
This feature is particularly valuable for:
Future Considerations
For credentials that expire, users may want to:
Fixes #35
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]