Skip to content

Commit bab4969

Browse files
ultratinsodabrew
andcommitted
Updated README SSL documentation (brianmario#1142)
Co-Authored-By: Aaron Stone <aaron@serendipity.cx>
1 parent 79c6263 commit bab4969

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ Mysql2::Client.new(
241241
:reconnect = true/false,
242242
:local_infile = true/false,
243243
:secure_auth = true/false,
244-
:ssl_mode = :disabled / :preferred / :required / :verify_ca / :verify_identity,
245244
:default_file = '/path/to/my.cfg',
246245
:default_group = 'my.cfg section',
247246
:default_auth = 'authentication_windows_client'
@@ -268,8 +267,13 @@ Setting any of the following options will enable an SSL connection, but only if
268267
your MySQL client library and server have been compiled with SSL support.
269268
MySQL client library defaults will be used for any parameters that are left out
270269
or set to nil. Relative paths are allowed, and may be required by managed
271-
hosting providers such as Heroku. Set `:sslverify => true` to require that the
272-
server presents a valid certificate.
270+
hosting providers such as Heroku.
271+
272+
For MySQL versions 5.7.11 and higher, use `:ssl_mode` to prefer or require an
273+
SSL connection and certificate validation. For earlier versions of MySQL, use
274+
the `:sslverify` boolean. For details on each of the `:ssl_mode` options, see
275+
[https://dev.mysql.com/doc/refman/8.0/en/connection-options.html](https://dev.mysql.com/doc/refman/8.0/en/connection-options.html#option_general_ssl-mode).
276+
273277

274278
``` ruby
275279
Mysql2::Client.new(
@@ -279,7 +283,8 @@ Mysql2::Client.new(
279283
:sslca => '/path/to/ca-cert.pem',
280284
:sslcapath => '/path/to/cacerts',
281285
:sslcipher => 'DHE-RSA-AES256-SHA',
282-
:sslverify => true,
286+
:sslverify => true, # Removed in MySQL 8.0
287+
:ssl_mode = :disabled / :preferred / :required / :verify_ca / :verify_identity,
283288
)
284289
```
285290

0 commit comments

Comments
 (0)