trilogy-libraries / trilogy

Trilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.
MIT License
697 stars 68 forks source link

Implement caching_sha2_password for mysql 8+ #165

Closed eileencodes closed 5 months ago

eileencodes commented 5 months ago

This PR implements caching_sha2_password for mysql 8. Note that we have chosen on purpose to only implement the path where TLS or a unix socket is used. We will not be implementing the non-TLS/non-unix socket path.

Co-authored-by: John Hawthorn john@hawthorn.email Co-authored-by: Aaron Patterson (tenderlove) tenderlove@ruby-lang.org

Fixes: https://github.com/trilogy-libraries/trilogy/issues/26


For testing:

Point trilogy at this branch in your Gemfile:

gem "trilogy", github: "trilogy-libraries/trilogy", branch: "caching_sha2_password", glob: "contrib/ruby/*.gemspec"

Update your mysql auth plugin / policy to use caching_sha2_password over mysql_native_password