brianmario / mysql2

A modern, simple and very fast Mysql library for Ruby - binding to libmysql
http://github.com/brianmario/mysql2
MIT License
2.24k stars 550 forks source link

Does a mysql2 to MySQL version compatibility list exist? #1330

Closed dylanz closed 1 year ago

dylanz commented 1 year ago

Is there a compatibility list of what versions of the mysql2 gem work with what versions of MySQL? For example, will mysql2 0.3.21 work with MySQL 8.0.33?

sodabrew commented 1 year ago

There isn't an explicit matrix, but I agree that would be useful! The CI configs implicitly provide this matrix, but they've also morphed over time between different CI systems, base OS dropping old versions, etc.

dylanz commented 1 year ago

@sodabrew gotcha! I've been dealing with getting a Ruby 2.5 / Rails 3 (which requires mysql2 0.3.21) application working with MySQL 8 and wasn't sure if this was a possibility or not... however: {os: ubuntu-20.04, ruby: '2.5', db: mysql80}. It's possible! Compilation issues on an M1 seems to be my issue. Thanks for the heads up here!

Edit: Oh... I was looking at the CI config for HEAD and not the 0.3.21 tag. There are no tests for MySQL 8x in the old CI configs. So, it may not be possible :)

sodabrew commented 1 year ago

In this case, I recommend creating a local/private fork and backport as needed for your environment. Gemfile has a nice syntax for referencing a git repository https://bundler.io/guides/git.html