Skip to content

Standardize MySQL URL scheme and support inline passwords#151

Merged
dccote merged 1 commit intomasterfrom
fix/standard-mysql-url-scheme
Mar 3, 2026
Merged

Standardize MySQL URL scheme and support inline passwords#151
dccote merged 1 commit intomasterfrom
fix/standard-mysql-url-scheme

Conversation

@dccote
Copy link
Copy Markdown
Contributor

@dccote dccote commented Mar 3, 2026

Summary

  • URL format changed from non-standard mysql://host:port/user@database to standard mysql://user[:password]@host[:port]/database
  • SSH tunnel URLs changed from mysql+ssh://sshuser@sshhost:mysqlhost/mysqluser@database to mysql+ssh://sshuser@sshhost/mysqluser[:password]@mysqlhost[:port]/database
  • parseURL() now uses urllib.parse.urlparse instead of fragile regexes for mysql:// scheme
  • When a password is provided in the URL, keyring lookup is skipped entirely
  • Fixes Database.connect() silently overriding the parsed port with hardcoded 3306

Test plan

  • All 635 tests pass (44 skipped, 16 xfailed)
  • URL parsing verified for all combinations: with/without password, with/without port, direct and SSH tunnel

🤖 Generated with Claude Code

URL format changed from non-standard mysql://host:port/user@database to
standard mysql://user[:password]@host[:port]/database. Similarly for SSH
tunnels: mysql+ssh://sshuser@sshhost/mysqluser[:password]@mysqlhost[:port]/database.

parseURL() now uses urllib.parse.urlparse instead of fragile regexes.
When a password is provided in the URL, keyring lookup is skipped entirely.
Also fixes Database.connect() overriding the parsed port with hardcoded 3306.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dccote dccote merged commit 850440b into master Mar 3, 2026
@dccote dccote deleted the fix/standard-mysql-url-scheme branch March 4, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant