Classic ASP MySQL Wrong Authentication Method

2019-09-11 01:47发布

问题:

I have a classic ASP site that I just uploaded to a different server, and it is giving the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server; consider upgrading MySQL client

I tried doing what is suggested everywhere including the official MySQL website: http://dev.mysql.com/doc/refman/5.6/en/old-client.html

That is, going to the mysql.user table and changing the password with the OLD_PASSWORD() function, and changing the plugin value to mysql_old_password, and flushing privileges.

For some reason it still doesn't work.

The server is connecting to a remote MySQL server with MySQL 5.6 installed.

The connection string is:

DRIVER={MySQL ODBC 3.51 Driver};SERVER=server_IP;DATABASE=db_name;UID=user_name;PASSWORD=password;OPTION=3;charset=utf8;stmt=SET CHARACTER SET Hebrew;

回答1:

The connection driver should be: DRIVER={MySQL ODBC 5.1 Driver}, therefore the resultant connection string is:

DRIVER={MySQL ODBC 5.1 Driver};SERVER=server_IP;DATABASE=db_name;UID=user_name;PASSWORD=password;OPTION=3;charset=utf8;stmt=SET CHARACTER SET Hebrew;

UPDATE Here is a list of MySQL ODBC drivers. You can obtain the latest version & view the release notes: http://dev.mysql.com/doc/relnotes/connector-odbc/en/