-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
let uri = "mysql://username:p@ssw0rd@[::1]:5432/database";
let opts = MySqlConnectOptions::from_str(uri).unwrap();
println!("{:?}", opts.host); // the opts.host is "[::1]"sqlx try to use this host to connect at
| None => Socket::connect_tcp(&options.host, options.port).await?, |
but [::1] is a invalid address for tokio::net::TcpStream::connect, which expect a address like ::1 without a []
so, we will get an error failed to lookup address information: Name or service not known
Reactions are currently unavailable