MySQL 不支持身份验证方法“mysql_old_password”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13706463/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 15:40:07  来源:igfitidea点击:

Authentication method 'mysql_old_password' not supported

mysqlvisual-studio-2012connector-net

提问by Cristiano Nascimento

Updated the mysql connector. Net to version 6.6.4 provider to integrate with visual studio 2012, but now when I try to configure the connection to the edmx occurs the error "Authentication method 'mysql_old_password' not supported".

更新了 mysql 连接器。Net 到版本 6.6.4 提供程序以与 Visual Studio 2012 集成,但是现在当我尝试配置与 edmx 的连接时出现错误“不支持身份验证方法 'mysql_old_password'”。

回答by Erik Schierboom

This error message is shown when you are connecting to a MySQL database that has its passwords stored in the old password format (http://dev.mysql.com/doc/refman/5.0/en/old-client.html). Newer MySQL clients do not allow a connection to be made to databases using the old password format as it is less secure.

当您连接到以旧密码格式 ( http://dev.mysql.com/doc/refman/5.0/en/old-client.html)存储密码的 MySQL 数据库时,会显示此错误消息。较新的 MySQL 客户端不允许使用旧密码格式连接到数据库,因为它不太安全。

Some would suggest to set old_passwords=1at the MySQL server, but I think it would be better to upgrade the passwords to the new password format. Then the MySQL connection can be setup again and your database will be better protected.

有些人会建议old_passwords=1在MySQL服务器上设置,但我认为将密码升级为新的密码格式会更好。然后可以再次设置 MySQL 连接,您的数据库将得到更好的保护。

You can read about how to upgrade your MySQL passwords from the old format to the new format here: http://code.openark.org/blog/mysql/upgrading-passwords-from-old_passwords-to-new-passwords

您可以在此处阅读有关如何将 MySQL 密码从旧格式升级到新格式的信息:http: //code.openark.org/blog/mysql/upgrading-passwords-from-old_passwords-to-new-passwords

回答by Fernando Gonzalez Sanchez

MysqL Connector/NET 6.6.x (as of 6.6.2) dropped support for old password style authentication (it was deprecated due to being insecure and there were documented ways to attack it).

MysqL Connector/NET 6.6.x(从 6.6.2 开始)放弃了对旧密码样式身份验证的支持(由于不安全而被弃用,并且有记录的攻击方法)。

When trying to use it with old password style account, you will get an Arithmethic overflow error (granted, a more friendly error would be better).

当尝试将它与旧密码样式帐户一起使用时,您将收到算术溢出错误(当然,更友好的错误会更好)。

As stated in this bug report: http://bugs.mysql.com/bug.php?id=66647For Connector/NET you have to use Native 4.1 style passwords (which is old_passwords=0).

正如此错误报告中所述:http: //bugs.mysql.com/bug.php?id=66647 对于 Connector/NET,您必须使用 Native 4.1 样式的密码(即 old_passwords=0)。

Other option is Windows Style Authentication, which is also supported, but you'll need some MySql commercial edition (standard MySql server doesn't have support for windows authentication).

另一个选项是 Windows Style Authentication,它也受支持,但您需要一些 MySql 商业版(标准 MySql 服务器不支持 Windows 身份验证)。

回答by Damien Overeem

Mysql_old_password was temporary and was ment to be used for older mysql clients right after 4.1.1 to authenticate to a pre-4.1.1 mysql server.

Mysql_old_password 是临时的,在 4.1.1 之后立即用于较旧的 mysql 客户端,以对 4.1.1 之前的 mysql 服务器进行身份验证。

Setting the var old_passwords=1in your mysql servers my.ini should enable this functionality.

old_passwords=1在您的 mysql 服务器 my.ini 中设置 var应启用此功能。