Replies: 1 comment
-
you can use some crate for let db_url = Url::parse("mysql://root:password@localhost/db").unwrap();
let conn = MySqlConnectOptions::new()
.host(db_url.host())
.username(db_url.username())
.password(db_url.password())
.database(db_url.path().strip_prefix("/").unwrap())
.connect().await?; Haven't tested but should work with little tuning |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I can only use a full database_url, like mysql://root:password@localhost/db. I want to disable_statement_logging.
How can I do this?
Beta Was this translation helpful? Give feedback.
All reactions