Skip to content

Fix #144: Automatically strip port 3306 from connection strings#211

Open
Vishhh03 wants to merge 1 commit into
planetscale:mainfrom
Vishhh03:fix-issue-144-port-3306
Open

Fix #144: Automatically strip port 3306 from connection strings#211
Vishhh03 wants to merge 1 commit into
planetscale:mainfrom
Vishhh03:fix-issue-144-port-3306

Conversation

@Vishhh03

Copy link
Copy Markdown

Closes #144

I updated the buildURL function in src/index.ts to automatically ignore port 3306 when generating the connection URL if it's found in the config.url.

I also updated the Connection class constructor to strip 3306 directly from config.host if you pass the connection properties separately (e.g., host, username, password), coercing it properly to standard HTTPS (port 443).

I added a couple of test cases in __tests__/index.test.ts to verify that 3306 is properly stripped in both scenarios.

@Vishhh03 Vishhh03 requested review from a team and mattrobenolt as code owners June 29, 2026 13:21
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.

Automatically handle seeing a port 3306 in a connection string

1 participant