I needed to connect to MYSQL databases via asp.net. I am using MySQL Connector to make connection with database but while doing this I am having this Error:
Authentication with old password no longer supported, use 4.1 style passwords.
解决方案
From MySQL 4.1 and higher they use a new protocol that is not compatible with earlier versions. Which is why when you upgrade the server from an earlier version to 4.1 or higher you receive the authentication error message.
If you need to connect to the database with both clients before and after version 4.1 you must have two passwords stored. One the old way and one the new way.
You can set a users password to the new way using:
SET PASSWORD for = PASSWORD('new password')
SET PASSWORD FOR 'steve'@'10.15.2.67' = PASSWORD('my secure password');
If needed you can also set passwords to the old way using:
SET PASSWORD for = OLD_PASSWORD('new password')
SET PASSWORD FOR 'steve'@'10.15.2.67' = OLD_PASSWORD('my secure password');
There is a great page in the MySQL manual which will detail the process
You can actually for the server if newer than 4.1 to still use the old password method however this isn't recommended.
To do this, you can start the server with the --old-passwords option.
So, either the server has updated and you're using a old client - or you've updated your client (which now uses the new password system) and your connecting to a server below 4.1