MainelyDesign.com Blog

Dealing with MySQL Old-Style Passwords

Posted on 05/20/2009 at 04:37 pm by Kevin Wentworth
Viewed 12,709 times | 0 comments

I ran into a problem I've seen before- Client does not support authentication protocol requested by server; consider upgrading MySQL client. Last time I came across this MySQL error, it was a simple query to fix the issue (from dev.mysql.com):

  1. UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') WHERE Host = 'some_host' AND User = 'some_user';
  2. FLUSH PRIVILEGES;

That didn't work... instead IT CRASHED THE SERVER!  I was in a position that I couldn't upgrade the version of PHP (running PHP 4.4.3).  Upgrading would have given me access to the mysqli library- the improved library for MySQL.  No such luck.  I thought I was up the creek. 

Then I came up with a very simple solution.  I had done this before on another MySQL server without it crashing.  Here's what I did:

  • I made the login I wanted and used the above SQL to "downgrade" the password using the old_password() function on the server that it worked on.
  • I had root access to both MySQL servers
  • I copied (CTRL-C/CTRL-V for you power users) the password from the one server to the other
  • Flushed the privaleges and boom!  It worked.

I'm not sure what was crashing the MySQL server (it's version 4.1.4).  I didn't have time.  Sometimes the low-tech way is the best way.  Cheers,

-Kevin Wentworth


Bookmark and Share

Tags for Dealing with MySQL Old-Style Passwords

Database | Usage | Web Programming | Software | Mysql

Comments for this Posting

No comments. Be the first to post a reply.

Sorry, comments are closed for this posting.

Please Email Kevin if you have any questions. Thanks!

Meet Site Avenger - Hosted Content Management System

Powered By: Site Avenger | Site Production: Saco Design