Skip to content

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

@mh-github

Description

@mh-github

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions