This issue was addressed here: https://github.com/brianmario/mysql2/issues/950
For Rails 4.x please pin the gem to mysql2 '~> 0.4.0' to avoid the 0.5.x upgrade.
Gemfile:
gem 'rails', '4.2.8'
gem 'mysql2', '~> 0.4.0'
Then run bundle update rails mysql2
I am currently using mysql v 8.0.11