Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I downloaded the latest MySQL connector for .Net and I got this error "Authentication with old password no longer supported, use 4.1 style passwords."

I found a StackOverflow post on how to fix it so I stupidly logged in as root with Sqlyog and run these two quires:

SET SESSION old_passwords=FALSE;
SET PASSWORD = PASSWORD('[your password]');

Now I can't log in as root. Is there a way to reverse it back to use old_password? The root password length is 41 from 16. I can't upgrade every users password because there are other users using it and I don't want to break. What's my option here? Can I use instance config wizard to change root password?

EDIT: My server is Win2003 Standard, IIS6 and I can have admin access to the server.

share|improve this question
2  
restart mysql server with passwords disabled and reset the root password –  anttiR Feb 7 '13 at 20:46
    
Is the mysql server a linux box? If yes, do you have root access to it? –  Daniel t. Feb 7 '13 at 20:58
    
Win2003 Standard and I have admin access to it. Can you show me or point me to how to reset password on Win2003? –  Jack Feb 7 '13 at 21:15
    
add comment

1 Answer 1

The documentation explains how to reset the root password. The summary is to create a file containing SQL statements to set the password:

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;

Then stop mysqld, and manually start it again, but telling it to execute this SQL file:

sudo -u mysqld mysqld_safe --init-file=/home/me/mysql-init
share|improve this answer
    
Hi, your link didn't say anything about old_password. If I reset root password, would it fix the old_password set to false? Sorry, I'm not a admin but a developer. My server is Win2003. –  Jack Feb 7 '13 at 21:17
    
@Jack Add the SQL to change old_passwords to that file. –  mgorven Feb 7 '13 at 21:18
    
Thanks go out to Daniel T and mgorven. What I found out that work is combined both their answers. Follow Daniel's link to change my.ini setting then on the step of running update query use mgorven's answer. UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; FLUSH PRIVILEGES; –  Jack Feb 8 '13 at 14:42
    
Glad this resolved your issue. Please be sure to mark your answer as accepted when you're able. –  jscott Apr 21 '13 at 17:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.