Skip to content

feat(core, mysql): expose MySQL connection options to sqlx.toml - #4314

Open
XiNiHa wants to merge 1 commit into
transact-rs:mainfrom
contentstech-com:feat/mysql-config
Open

feat(core, mysql): expose MySQL connection options to sqlx.toml#4314
XiNiHa wants to merge 1 commit into
transact-rs:mainfrom
contentstech-com:feat/mysql-config

Conversation

@XiNiHa

@XiNiHa XiNiHa commented Jun 18, 2026

Copy link
Copy Markdown

Does your PR solve an issue?

related #3205

This PR makes two MySQL connection options configurable through sqlx.toml, which are essential to some databases like StarRocks to be used with the SQLx CLI and the query macros.

Is this a breaking change?

No. It only adds new methods and config options. Users don't get affected unless they explicitly opt in to using sqlx.toml with the added config options. Defaults remain consistent.

@XiNiHa
XiNiHa force-pushed the feat/mysql-config branch from 179262d to cbe35ff Compare June 18, 2026 05:24
@XiNiHa
XiNiHa force-pushed the feat/mysql-config branch 3 times, most recently from f3e4b6d to be10fda Compare July 6, 2026 02:46
@XiNiHa
XiNiHa force-pushed the feat/mysql-config branch 2 times, most recently from 2d4df71 to 89a4440 Compare September 1, 2026 10:45
Comment thread sqlx-core/src/config/drivers.rs Outdated
@@ -40,14 +40,38 @@ pub struct Config {
}

/// Configuration for the MySQL database driver.

@abonander abonander Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I'd expect people to overlook the note on drivers::Config, please copy the note here about this only applying for the macros and sqlx-cli. And possibly to the individual fields themselves as well.

I do think we'll eventually want to support embedding a config and applying it at runtime, but that doesn't exist right now.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants