Re: PHP 5.3.6 and MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Aug 22, 2011 at 8:37 PM, Keith Roberts <keith@xxxxxxxxxxxx> wrote:
> On Mon, 22 Aug 2011, Eric H.M.M. Condic wrote:
>
>> To: php-install@xxxxxxxxxxxxx
>> From: Eric H.M.M. Condic <condic@xxxxxxxxxxx>
>> Subject:  PHP 5.3.6 and MySQL
>>
>> We have just upgraded to PHP 5.3.6 and everything is working except the
>> link to a remote MySQL database.  When we run a test script, we get the
>> following error message, see below.  MySQL is version 5.1.52:
>>
>> ------------------------------------------------------------------------
>> Could not connect: mysqlnd cannot connect to MySQL 4.1+ using the old
>> insecure authentication. Please use an administration tool to reset your
>> password with the command SET PASSWORD = PASSWORD('your_existing_password').
>> This will store a new, and more secure, hash value in mysql.user. If this
>> user is used in other scripts executed by PHP 5.2 or earlier you might need
>> to remove the old-passwords flag from your my.cnf file
>> ------------------------------------------------------------------------
>
> Hello Eric
>
> IIRC the MySQL passwords changed from version 4.x to 5.x.
>
> That error message looks like the old version of MySQL 4.1 is still running?
>
> Can you run a PHP script with this as it's contents, to get what's currently
> running on your server please?
>
> <head>
> <title>php-info</title>
> </head>
>
> <?php phpinfo(); ?>
>
> view that in a browser and check what versions of PHP and MySQL you are
> using.
>
> This will give you the client versions, but it will not tell you waht
> version of MySQL server is running - and I suspect it is still running the
> old 4.1 version.
>
> Check you have the new 5.x version of MySQL installed on your server, then
> try stopping and then restarting MySQL and see if that brings the new
> version to life.
>

my guess is that it is running mysql 5 (5.1 probably) but the password
was set either via the OLD_PASSWORD() function, or back when the old
algorithm was the default(before mysql 5.1).
its time for you to update your mysql password to the new password algo:
you can find more info on
http://dev.mysql.com/doc/refman/5.1/en/old-client.html

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu



[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux