Reply to Re: Cannot connect to MySQL server using PHP on localhost

Your name:

Reply:


Posted by Chris Hope on 11/17/05 20:51

Kim André Akerø wrote:

> Meião wrote:
>
>> yeah, if you're running PHP 4, it doesn't like MySQL 5 very much
>> PHP 5 uses mysqli which works
>
> Version numbers between PHP and MySQL doesn't have anything to do with
> eachother.
>
> However, if you recently upgraded your MySQL server software, you
> probably need to upgrade your MySQL extension for PHP (Windows) or
> recompile PHP to include the updated MySQL client (Linux/BSD).

I found this issue myself yesterday when installing PHP on Windows with
MySQL 4.1. There's an incompatibility between the mysql client library
in the particular PHP binary I installed.

If you are not able to ensure the two have the same version (ie mysql
client version compiled into php is the same as that of mysql
installed) then you can simply change the password like so:

update user set password = OLD_PASSWORD('password here') where user =
'username';

flush privileges;

This of course assumes you have the rights to update user passwords...

--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация