-
Notifications
You must be signed in to change notification settings - Fork 554
Description
How do I make mysql2 gem (0.5.2) pick caching_sha2_password on Windows10?
My versions are:
- MySQL 8.0.13 (installed with SHA-256 password encryption option)
- ruby 2.5.3p105 (2018-10-18 revision 65156) [x64-mingw32]
- Rails 5.2.1
I'd installed Ruby with rubyinstaller-devkit-2.5.3-1-x64.
To fix the problem, I uninstalled mysql2 gem and installed again using with-mysql-dir option first with Connector/C path and then with MySQL server path. In both cases the gem was installed but at run time, Rails does not find caching_sha2_password.
Here are my install commands:
gem uninstall mysql2
Successfully uninstalled mysql2-0.5.2-x64-mingw32
gem install mysql2 -- '--with-mysql-dir="C:\Program Files\MySQL\MySQL Connector C 6.1"'
Fetching: mysql2-0.5.2-x64-mingw32.gem (100%)
======================================================================================================
You've installed the binary version of mysql2.
It was built using MySQL Connector/C version 6.1.11.
It's recommended to use the exact same version to avoid potential issues.
At the time of building this gem, the necessary DLL files were retrieved from:
http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1.11-win32.zip
This gem includes vendor/libmysql.dll with redistribution notice in vendor/README.
======================================================================================================
Successfully installed mysql2-0.5.2-x64-mingw32
Parsing documentation for mysql2-0.5.2-x64-mingw32
Installing ri documentation for mysql2-0.5.2-x64-mingw32
Done installing documentation for mysql2 after 2 seconds
1 gem installed
Got the same messages with
gem install mysql2 -- '--with-mysql-dir="C:\Program Files\MySQL\MySQL Server 8.0"'