Tuesday, February 22, 2005

PHP with mySQL Authentication Protocol OLD_PASSWORD Problem

I just finished wrestling through a problem with mySQL that I now understand.
I'll share my experience in hopes that someone else who has the same problem in the future will stumble on the solution here.

Problem: A PHP client of a mySQL database gets an error message when calling mysql_connect:
"Client does not support authentication protocol requested
by server; consider upgrading MySQL client"

It turns out that the problem is because I changed the PHP client user password using Navicat 2004 6.1.9. Apparently, almost all of the mySQL Administration packages change a password using a new mySQL 4.1.1 password hashing scheme. The PHP client uses an old hashing scheme so the authentication fails. Even though the password is correct it doesn't get hashed using the same scheme that the admin client used.

Solution: Use the mySQL command-line client to change the password...

mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

The OLD_PASSWORD function forces the hashing scheme to be the same that the PHP client uses.

Read more about it in the mySQL Reference Manual.

16 Comments:

Blogger The Critic said...

I was just searching for a product, service or web page to review for my site SEO Traffic Rank, I'm constantly trying to find related info for chest seo tool. Any way I liked your page!

2:55 AM  
Blogger Rich Molumby said...

I have an E-Cash Machine site/blog. It pretty much covers Making money on the web.

Come and check it out if you get time :-)

8:29 AM  
Anonymous Anonymous said...

One good resource for point of sale software and many more free software alternatives is Software4YourSuccess.com
Yes it is my site and I would love for you to drop by for a second. From there you will have free access to several of my products such as The Marketing Toolbar (which is goldmine of information on how to do things quickly and on the cheap, thus saving you time and money).
Also for webmasters I have created Webmaster Wizards, which will help you with almost every aspect of putting code on your site from things such as legal and privacy disclaimers to popunders. I have so much content and free software there I could fill up this whole blog, so check it out Thanks, Sincerely Rob Rudd

11:44 PM  
Blogger cash at home said...

Hello, I was just blog surfing and found you! If you are interested, go see my

href="http://www.domaincity.ws/BlogSubmitterPro.htm">firm india seo
related site. It isnt

anything special but you may still find something of interest.

12:47 AM  
Blogger cash at home said...

Hello, I was just blog surfing and found you! If you are interested, go see my

href="http://www.domaincity.ws/BlogSubmitterPro.htm">seo tip
related site. It isnt

anything special but you may still find something of interest.

12:47 AM  
Anonymous Anonymous said...

website design bathurst I found your site looking for ecommerce web site design and thought I'd just say Hi.

4:14 PM  
Blogger hassan said...

Hi :)

You have a great blog! I'll make sure to visit regularly.

If you want your blog to get higher in search engines, why not try Link Metro, you can over 100 new links to your blog every single day, for FREE!

10:18 PM  
Anonymous Anonymous said...

RSS Announcer instantly and automatically submits your RSS feeds

12:24 PM  
Anonymous Anonymous said...

RSS Announcer instantly and automatically submits your RSS feeds

12:42 PM  
Blogger musica said...

Great blog it really nice. To learn more about blogger visit
search engine position The best search engine position

7:26 AM  
Anonymous Anonymous said...

If you would just take your time to know your way around, you could discover

2:12 PM  
Anonymous WordPress said...

Did you know that you could easily introduce your own blogger.com blog to wordpress blogs?


Thanks,
WordPress Blog Submitter

11:29 AM  
Anonymous Army said...

Excellent site, enjoyed my visit! I will be back soon!

12:21 AM  
Anonymous Topper said...

Search engine optimization, submission and highly-targeted traffic can be found exclusively at www.TheOnlinePromoters.com

2:09 AM  
Blogger cbhorsebetting said...

Hey, you have a great blog for merchant account here! I'm definitely going to bookmark you for make money pn ebay!

I have an interesting site related to merchant account. It pretty much covers merchant account related stuff.

Come and check it out for merchant account if you get time :-)

Thanks and Get More Than You Expect With
Bunny S.
Great Site for merchant account

2:53 PM  
Blogger Irene M. said...

Your credit card processing services account holder will also be able to help you out with these types of problems.

7:44 PM  

Post a Comment

<< Home

FREE hit counter and Internet traffic statistics from freestats.com