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

Windows 10: Authentication plugin 'caching_sha2_password' cannot be loaded: The specified module could not be found. #1015

Open
mh-github opened this Issue Nov 22, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@mh-github
Copy link

mh-github commented Nov 22, 2018

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"'

Here is the error screen:

image

@sodabrew

This comment has been minimized.

Copy link
Collaborator

sodabrew commented Nov 22, 2018

@azdrenymeri

This comment has been minimized.

Copy link

azdrenymeri commented Dec 28, 2018

I had the similar problem but i used this SQL code to create a new user in mysql shell:
CREATE USER 'nativeuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';
nativeuser - you can add your user
new_password - your new password
StackOverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.