0

I have looked and found many wrong ways to accomplish something like:

connectionString = "Server=" + server + ";" + "Database=" + database + ";" + "Uid=" + uid + ";" + "Pwd=" + password + ";" + "useOldAuth=true;";

Notice the "useOldAuth=true;" that is what I an essentially trying to do.

My problem is that I cannot connect to my db because of the "Authentication with old password no longer supported, use 4.1 style passwords." issue.

I checked with my hosting provider and they said they cannot/willnot change their server just for me so I need to find a way to connect within the code using the old auth.

I have poured through this and not found anything useful... What am I missing? Thanks!

yoyo
  • 79
  • 3
  • 11
  • 6
    Why do you need the old method? – Mixthos Jan 07 '14 at 01:49
  • Which host? looks like it might be hostgator? Duplicate maybe http://stackoverflow.com/questions/15772479/authentication-with-old-password-no-longer-supported-use-4-1-style-passwords – Chris Tinsley Jan 07 '14 at 02:17
  • 1
    It is IX actually, I know it is a horrible thing to specifically code for an obsolete/insecure technology but I am just asking for how to do it. As for the duplicate, I did see that one but the answers did not apply/work and no one ever solved his problem... I mean my problem is mostly identical, but his was never solved nor is mine. – yoyo Jan 07 '14 at 15:01

1 Answers1

0

I just solved my problem:

1) Connect to the db with mysql workbench (select the "use old auth" and "send pass in cleartext"

2) Using the workbench, I ran the following several times (because it kept saying '0 rows affected'): (also change userID and password to your proper stuff)

SET SESSION old_passwords=0; 
SET PASSWORD FOR userID=PASSWORD('password');

SET SESSION old_passwords=false; 
SET PASSWORD FOR userID=PASSWORD('password');

3) Now go back to your app and it should run...

That is how I did it at least. I am using IX mysql and they do use old auth on their server so you must do something on your end...

NOTE: If anyone does know of a way to accomplish what I originally asked, please let me know. I am still curious if there is a way to pass in the parameter to "useLegacyAuth" or the like. Thanks.

yoyo
  • 79
  • 3
  • 11