MySQL 8.0.11 错误connect to caching_sha2_password 找不到指定的模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50169576/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MySQL 8.0.11 error connect to caching_sha2_password the specified module could not be found
提问by MT32
I've tried to connect to the latest MySQL server 8.0.11 from MySQL workbench, but the error keeps popping up: Cannot connect to MySQL server, authentication plugin: caching_sha2_password: the specified module could not be found.
我尝试从 MySQL Workbench 连接到最新的 MySQL 服务器 8.0.11,但错误不断弹出:无法连接到 MySQL 服务器,身份验证插件:caching_sha2_password:找不到指定的模块。
I tried looking at MySQL server installation videos online and replicated every step accurately, but the error persists.
我尝试在网上查看MySQL服务器安装视频并准确复制每一步,但错误仍然存在。
Any help is greatly appreciated.
任何帮助是极大的赞赏。
回答by vikentiy
I had the following solution:
change my.iniin a [mysqld]
section like this:
我有以下解决方案:在这样的部分中更改my.ini[mysqld]
:
#default_authentication_plugin=caching_sha2_password (comment line!)
default_authentication_plugin=mysql_native_password (new line)
Connect to your MySQL under root in a command line client and execute:
在命令行客户端中连接到 root 下的 MySQL 并执行:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxx';
Where xxx
is your current password.
xxx
您当前的密码在哪里。
回答by Sukma Saputra
Try to connect your MySQL use terminal, and use this.
尝试连接您的 MySQL 使用终端,并使用它。
mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
I hope this can help. Happy coding!
我希望这会有所帮助。快乐编码!
回答by wchiquito
See:
看:
Changes in MySQL Workbench 8.0.11 (2018-04-19, Release Candidate)
...
- MySQL Workbench now supports the caching_sha2_password authentication plugin introduced in MySQL 8.0 (see Caching SHA-2 Pluggable Authentication). A user account can be reset to use the other available authentication types for making a connection.
...
MySQL Workbench 8.0.11 (2018-04-19, Release Candidate) 的变化
...
- MySQL Workbench 现在支持 MySQL 8.0 中引入的 caching_sha2_password 身份验证插件(请参阅缓存 SHA-2 可插入身份验证)。可以重置用户帐户以使用其他可用的身份验证类型进行连接。
...
回答by Marty
I was seeing this issue with HeidiSQL, and I found a workaround in the HeidiSQL Github repository:
我在 HeidiSQL 中看到了这个问题,我在 HeidiSQL Github 存储库中找到了一个解决方法:
https://github.com/HeidiSQL/HeidiSQL/issues/163
https://github.com/HeidiSQL/HeidiSQL/issues/163
I fixed by copying libmysql.dll from my last MySql install to my HeidiSQL folder.
我通过将 libmysql.dll 从我上次安装的 MySql 复制到我的 HeidiSQL 文件夹来修复。
回答by Md.
I know it is an old post. This is just to share my experience, hoping it will be useful for someone. I also faced similar issue. We can use the portable version of Heidisql. The portable version does not have this issue.
我知道这是一个旧帖子。这只是分享我的经验,希望它对某人有用。我也遇到了类似的问题。我们可以使用 Heidisql 的便携版。便携版没有这个问题。
回答by Avinash Pawar
using mysql_native_password is a workaround.
使用 mysql_native_password 是一种解决方法。
Your client software (MySQL Workbench) does not support the authentication plugin most probably because it is an older version.
您的客户端软件 (MySQL Workbench) 不支持身份验证插件很可能是因为它是旧版本。
follow the above link.
按照上面的链接。
回答by MT32
After poking around I actually found a way to solve it:
在四处摸索之后,我实际上找到了解决它的方法:
During the configuration, when you reach the authentication method choose the Legacy Authentication Method.
在配置过程中,当您到达身份验证方法时,请选择传统身份验证方法。
It worked for me~!
对我有用~!
回答by user3784340
If you have just installed mysql server. Run the installer again and it will allow you to reconfigure the options. On the third sceen it will say "Use legacy Authentication method" choose that option
如果你刚刚安装了mysql服务器。再次运行安装程序,它将允许您重新配置选项。在第三个屏幕上它会说“使用旧的身份验证方法”选择该选项
回答by Parthasarathy S
The actual reason for "caching_sha2_password" is because while installing MySQL under Authentication Method, by default Use Strong Crypted Passwordradio button is chosen, instead we need to give User Legacy Authentication typepassword option for password
“caching_sha2_password”的实际原因是因为在 Authentication Method 下安装 MySQL 时,默认情况下选择了Use Strong Crypted Password单选按钮,而不是我们需要为密码提供User Legacy Authentication typepassword 选项
Run this in MySQL WorkBench:
在 MySQL WorkBench 中运行:
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Then further edit the credential and schema to access under the below directory path:
然后进一步编辑凭据和架构以在以下目录路径下访问:
ror_project_path/config/database.yml