@@ -241,7 +241,6 @@ Mysql2::Client.new(
241
241
:reconnect = true / false ,
242
242
:local_infile = true / false ,
243
243
:secure_auth = true / false ,
244
- :ssl_mode = :disabled / :preferred / :required / :verify_ca / :verify_identity ,
245
244
:default_file = ' /path/to/my.cfg' ,
246
245
:default_group = ' my.cfg section' ,
247
246
:default_auth = ' authentication_windows_client'
@@ -268,8 +267,13 @@ Setting any of the following options will enable an SSL connection, but only if
268
267
your MySQL client library and server have been compiled with SSL support.
269
268
MySQL client library defaults will be used for any parameters that are left out
270
269
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
+
273
277
274
278
``` ruby
275
279
Mysql2 ::Client .new (
@@ -279,7 +283,8 @@ Mysql2::Client.new(
279
283
:sslca => ' /path/to/ca-cert.pem' ,
280
284
:sslcapath => ' /path/to/cacerts' ,
281
285
: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 ,
283
288
)
284
289
```
285
290
0 commit comments