Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8
c:\redmine-5.1.3>set RAILS_ENV=production
c:\redmine-5.1.3>bundle exec rake db:migrate
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'.
Gem Load Error is: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8.
Backtrace for gem load error is:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in `require'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in `block in require'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:299:in `load_dependency'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in `require'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mysql2-0.5.6/lib/mysql2.rb:36:in `<top (required)>'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:60:in `require'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:55:in `each'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:55:in `block in require'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:44:in `each'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler/runtime.rb:44:in `require'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.5.15/lib/bundler.rb:212:in `require'
c:/redmine-5.1.3/config/application.rb:18:in `<top (required)>'
c:/redmine-5.1.3/Rakefile:5:in `require'
c:/redmine-5.1.3/Rakefile:5:in `<top (required)>'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/rake_module.rb:29:in `load'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/rake_module.rb:29:in `load_rakefile'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:740:in `raw_load_rakefile'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:126:in `block in load_rakefile'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:125:in `load_rakefile'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:82:in `block in run'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/lib/rake/application.rb:80:in `run'
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
C:/Ruby31-x64/bin/rake:33:in `load'
C:/Ruby31-x64/bin/rake:33:in `<main>'
Bundler Error Backtrace:
c:/redmine-5.1.3/config/application.rb:18:in `<top (required)>'
c:/redmine-5.1.3/Rakefile:5:in `require'
c:/redmine-5.1.3/Rakefile:5:in `<top (required)>'
Caused by:
Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8.
c:/redmine-5.1.3/config/application.rb:18:in `<top (required)>'
c:/redmine-5.1.3/Rakefile:5:in `require'
c:/redmine-5.1.3/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
Replies (6)
RE: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8 - Added by Lei Liu 4 months ago
production:
adapter: mysql2
database: redmine
host: localhost
username: root
# username: redmine
password: "########"
# Use "utf8" instead of "utfmb4" for MySQL prior to 5.7.7
encoding: utf8mb4
variables:
# Recommended `transaction_isolation` for MySQL to avoid concurrency issues is
# `READ-COMMITTED`.
# In case of MySQL lower than 8, the variable name is `tx_isolation`.
# See https://www.redmine.org/projects/redmine/wiki/MySQL_configuration
transaction_isolation: "READ-COMMITTED"
RE: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8 - Added by Lei Liu 4 months ago
OS: windows 10
Redmine 5.1.3
mysql-installer-community-8.0.38.0
ruby 3.1.6-1-x64
RE: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8 - Added by Steve Zhou 3 months ago
This problem has nothing to do with redmine itself, I have found at least two ways to solve it, using the mysql library compilation, or using the ucrt64 library compilation, but need to manually modify the code
RE: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8 - Added by Steve Zhou 3 months ago
Steve Zhou wrote in RE: Incorrect MySQL client library version! This gem was...:
This problem has nothing to do with redmine itself, I have found at least two ways to solve it, using the mysql library compilation, or using the ucrt64 library compilation, but need to manually modify the code
RE: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8 - Added by Steve Zhou 3 months ago
Steve Zhou wrote in RE: Incorrect MySQL client library version! This gem was...:
This problem has nothing to do with redmine itself, I have found at least two ways to solve it, using the mysql library compilation, or using the ucrt64 library compilation, but need to manually modify the code
OS: Windows 11 ARM64 (MacOS VM)
Redmine 5.1.3
MariaDB 11.4.3
ruby 3.2.5-1
The above information is for your reference~
Good luck.
RE: Incorrect MySQL client library version! This gem was compiled for 10.8.8 but the client library is 3.3.8 - Added by Lei Liu 3 months ago
Thanks a lot for your help!
Using the mysql library compilation, or using the ucrt64 library compilation, but need to manually modify the code.
Can you give me more detail on how to do mysql library compilation and which line of code needs to be modified.