Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README SSL documentation #1142

Closed
wants to merge 2 commits into from

Conversation

ultratin
Copy link
Contributor

Updated the README to better reflect the update SSL options that Mysql supports for versions >= 5.7.11.

I was struggling with understanding the difference between verify_ssl and ssl_mode and felt that clarifying this in the README would help.

README.md Outdated
@@ -263,8 +262,9 @@ Setting any of the following options will enable an SSL connection, but only if
your MySQL client library and server have been compiled with SSL support.
MySQL client library defaults will be used for any parameters that are left out
or set to nil. Relative paths are allowed, and may be required by managed
hosting providers such as Heroku. Set `:sslverify => true` to require that the
server presents a valid certificate.
hosting providers such as Heroku. For MySQL versions > `5.7.11` do not use `:sslverify`
Copy link
Collaborator

@sodabrew sodabrew Oct 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to rephrase this in the positive, how about:

For MySQL versions 5.7.11 and higher, use :ssl_mode to prefer or require an SSL connection and certificate validation. For earlier versions of MySQL, use the :sslverify boolean.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off the top of my head, I don't recall the specific behavior if the user set :sslverify when connecting to MySQL 8. Based on the deprecation and now removal of this option, I think the mysql2 gem should enforce migrating users to :ssl_mode by way of warnings and failing the connection.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, changing it to sound more positive makes sense. Regarding the behaviour, I can open up an issue to track it.

@ultratin ultratin requested a review from sodabrew October 15, 2020 13:53
sodabrew added a commit to sodabrew/mysql2 that referenced this pull request Dec 28, 2022
@sodabrew
Copy link
Collaborator

Cherry-picked as bab4969, belated thank you for this PR!

@sodabrew sodabrew closed this Dec 28, 2022
@ultratin ultratin deleted the update-readme branch December 28, 2022 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants