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

MYSQL 8 support with mysql2 v 0.3.x #1349

Open
waqarnazir340 opened this issue Feb 1, 2024 · 5 comments
Open

MYSQL 8 support with mysql2 v 0.3.x #1349

waqarnazir340 opened this issue Feb 1, 2024 · 5 comments

Comments

@waqarnazir340
Copy link

waqarnazir340 commented Feb 1, 2024

Hi everyone,
I'm currently working on a legacy Rails project with the following specifications:

Rails version: 3.2.22.5
MySQL version: 5.7
mysql2 gem version: 0.3.19

As some of you may be aware, Amazon RDS for MySQL 5.7 is reaching the end of its standard support on February 29, 2024, and will subsequently provide EOL support for MYSQL 5.7 with additional charges. To avoid these extra charges, I'm exploring the possibility of upgrading MYSQL to 8.x.

The challenge I'm facing is that mysql2 gem version 0.3.x is not compatible with MYSQL 8, and any version of mysql2 gem above 0.3.x is not compatible with Rails 3.2.22.5. Upgrading the Rails version and subsequently using mysql2 0.5.x is not a feasible option at the moment due to time constraints.

I've come across a potential solution in the form of a pull request PR. I plan to test this in parallel, and I would greatly appreciate any insights, advice, or experiences any of you may have had in a similar situation.

If you have successfully patched mysql2 gem for MYSQL 8 compatibility or have faced a similar challenge, your guidance would be invaluable. Additionally, if you have any advice or recommendations regarding the mentioned pull request, please share your thoughts.

Thank you in advance for your time and assistance

@MadWagon
Copy link

Also in the same situation, any solution found ?

@Faq
Copy link

Faq commented Oct 22, 2024

So the main problem is that you still keeping that old Rails version what is end of life. Sooner or later you will update in anyway, I suggest to do it slowly as clearly backporting more and more fixes will be harder due to changes of used components. Nowadays up to date security should be more concerning aspect of any project.

@MadWagon
Copy link

So the main problem is that you still keeping that old Rails version what is end of life. Sooner or later you will update in anyway, I suggest to do it slowly as clearly backporting more and more fixes will be harder due to changes of used components. Nowadays up to date security should be more concerning aspect of any project.

Thank you for you great insights

@radox83
Copy link

radox83 commented Nov 21, 2024

Hi all, I'm facing the same issue when using Ruby 3.3.6, Rails 8.0.0, MySQL 8.4.0 and the mysql2 0.5.6 gem. I get 'There was an error while trying to load the gem 'mysql2'. (Bundler::GemRequireError)
Gem Load Error is: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.4.1.'

Any help will be much appreciated, thanks!

@Faq
Copy link

Faq commented Nov 21, 2024

@radox83 this issue is with old version of gem 0.3.x, you have new 0.5.6. Please make new issue if there is none with such error.

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

No branches or pull requests

4 participants