Struct mysql::conn::MyOpts
[−]
[src]
pub struct MyOpts { pub tcp_addr: Option<String>, pub tcp_port: u16, pub unix_addr: Option<PathBuf>, pub user: Option<String>, pub pass: Option<String>, pub db_name: Option<String>, pub prefer_socket: bool, pub init: Vec<String>, }
Mysql connection options.
For example:
let opts = MyOpts { user: Some("username".to_string()), pass: Some("password".to_string()), db_name: Some("mydatabase".to_string()), ..Default::default() };
Fields
tcp_addr | TCP address of mysql server (defaults to |
tcp_port | TCP port of mysql server (defaults to |
unix_addr | Path to unix socket of mysql server (defaults to |
user | User (defaults to |
pass | Password (defaults to |
db_name | Database name (defaults to |
prefer_socket | Prefer socket connection (defaults to Will reconnect via socket after TCP connection to |
init | Commands to execute on each new database connection. |