How to: Fix incorrect MySQL client library version

Upgrade mysql2 fixes the problem https://makandracards.com/makandra/515130-fix-for-mysql2-error-incorrect-mysql-client-library-version-this-gem-was-compiled-for-x-x-x-but-the-client-library-is-y-y-y

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 5.5.46 but the client library is 5.6.30.

Same as in Fix "libmysqlclient.so.20: cannot open shared object file: No such file or directory":

gem pristine mysql2

gem pristine re-installs a gem (without re-downloading), re-compiling all native extensions in the process.

Emanuel Over 6 years ago