5

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

3 Answers3

9

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.

Some would suggest to set old_passwords=1 at 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.

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

Erik Schierboom
  • 15,025
  • 10
  • 60
  • 79
2

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).

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=66647 For Connector/NET you have to use Native 4.1 style passwords (which is 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).

1

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.

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

Damien Overeem
  • 4,399
  • 4
  • 31
  • 53
  • 1
    is there any way to specify it in the connection string? Because I do not have access mysql server settings – Cristiano Nascimento Dec 04 '12 at 21:05
  • I honestly don't know. I don't know much about visual studio, I just know about mysql. But my best guess is that you can not do this with a connection string, since this is a method that has to be activated by the server, probably on boot time. And to be honest, you should try to find out why your connector tires to use an old password, since you should try to avoid this. (bad encryption) – Damien Overeem Dec 05 '12 at 07:54