File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,9 @@ Mysql2::Client.new(
108
108
:connect_timeout = seconds,
109
109
:reconnect = true / false ,
110
110
:local_infile = true / false ,
111
- :secure_auth = true / false
111
+ :secure_auth = true / false ,
112
+ :default_file = ' /path/to/my.cfg' ,
113
+ :default_group = ' my.cfg section'
112
114
)
113
115
```
114
116
### Multiple result sets
@@ -147,7 +149,16 @@ development:
147
149
host: 127.0.0.1
148
150
port: 3306
149
151
secure_auth: false
150
- ````
152
+ ```
153
+
154
+ ### Reading a MySQL config file
155
+ You may read configuration options from a MySQL configuration file by passing
156
+ the ` :default_file ` and ` :default_group ` paramters. For example:
157
+
158
+ ```
159
+ client = Mysql2::Client.new(:default_file => '/user/.my.cnf', :default_group => 'client')
160
+ ```
161
+
151
162
152
163
## Cascading config
153
164
You can’t perform that action at this time.
0 commit comments