Skip to content

Commit dd79552

Browse files
committed
Add SSL configuration options to README
1 parent 520f4bc commit dd79552

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,26 @@ Mysql2::Client.new(
160160
:default_group = 'my.cfg section'
161161
)
162162
```
163+
164+
### SSL options
165+
166+
Setting any of the following options will enable an SSL connection, but only if
167+
your MySQL client library and server have been compiled with SSL support.
168+
MySQL client library defaults will be used for any parameters that are left out
169+
or set to nil. Relative paths are allowed, and may be required by managed
170+
hosting providers such as Heroku.
171+
172+
```
173+
Mysql2::Client.new(
174+
...options as above...,
175+
:sslkey => '/path/to/client-key.pem',
176+
:sslcert => '/path/to/client-cert.pem',
177+
:sslca => '/path/to/ca-cert.pem',
178+
:sslcapath => '/path/to/cacerts',
179+
:sslcipher => 'DHE-RSA-AES256-SHA'
180+
)
181+
```
182+
163183
### Multiple result sets
164184

165185
You can also retrieve multiple result sets. For this to work you need to connect with

0 commit comments

Comments
 (0)