Very old question: Mysql and old authentication

View: New views
7 Messages — Rating Filter:   Alert me  

Very old question: Mysql and old authentication

by SuNcO :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Recently we update our Local Server to this:

Apache Version : 2.2.11  
PHP Version : 5.3.0  
MySQL Version : 5.1.36  

All works fine locally, but when we want to connect to a Remote Mysql Server 5.0.45 just can't, we got the "mysqlnd cannot connect to MySQL 4.1+ using old authentication" msg

The solution as i see is to use the OLD_PASSWORD trick, but in this case we can't do that because the Server is a Shared server and yada yada yada.. change some in the Remote Mysql Server is not an option

I think Php must provide a solution for this but we can't found it

We use SqlYog 6.05 to connect to Mysql Server's. Why it works with NEW and OLD algorithm and Php don't ?

Any help on this please ?

Re: Very old question: Mysql and old authentication

by Andy Shellam (Mailing Lists)-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The mysqlnd driver doesn't support MySQL 4.1 or earlier - it looks  
like the server that you think is 5.0.45 is actually a lot older, or  
your user account on MySQL has been set up using the old  
authentication method.

The solution would be to re-compile PHP 5.3 with the original MySQL  
client library (libmysql) instead of the newer mysqlnd.

Andy


On 29 October2009, at 20:05, SuNcO wrote:

> Recently we update our Local Server to this:
>
> Apache Version : 2.2.11
> PHP Version : 5.3.0
> MySQL Version : 5.1.36
>
> All works fine locally, but when we want to connect to a Remote  
> Mysql Server 5.0.45 just can't, we got the "mysqlnd cannot connect  
> to MySQL 4.1+ using old authentication" msg
>
> The solution as i see is to use the OLD_PASSWORD trick, but in this  
> case we can't do that because the Server is a Shared server and yada  
> yada yada.. change some in the Remote Mysql Server is not an option
>
> I think Php must provide a solution for this but we can't found it
>
> We use SqlYog 6.05 to connect to Mysql Server's. Why it works with  
> NEW and OLD algorithm and Php don't ?
>
> Any help on this please ?


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Very old question: Mysql and old authentication

by chris smith-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

SuNcO wrote:
> Recently we update our Local Server to this:
>
> Apache Version : 2.2.11  
> PHP Version : 5.3.0  
> MySQL Version : 5.1.36  
>
> All works fine locally, but when we want to connect to a Remote Mysql Server 5.0.45 just can't, we got the "mysqlnd cannot connect to MySQL 4.1+ using old authentication" msg

That's really confusing.

It works against a mysql 5.1.36 but not against a mysql version 5.0.45?

And gives you an error about trying to connect to mysql 4.1 or lower?

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Very old question: Mysql and old authentication

by SuNcO :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yep, is very weird, all works on Local Server

- Local Server
"old_passwords" "OFF"
"version" "5.1.36-community-log"

- Local Php
PHP Version : 5.3.0

Before this change, we use Php 5.2.6 with no problems

-Remote Server
"old_passwords" "ON"
"version" "5.0.45"

  "Chris" <dmagick@...> wrote in message news:4AEA0D20.5070809@......
  SuNcO wrote:
  > Recently we update our Local Server to this:
  >
  > Apache Version : 2.2.11  
  > PHP Version : 5.3.0  
  > MySQL Version : 5.1.36  
  >
  > All works fine locally, but when we want to connect to a Remote Mysql Server 5.0.45 just can't, we got the "mysqlnd cannot connect to MySQL 4.1+ using old authentication" msg

  That's really confusing.

  It works against a mysql 5.1.36 but not against a mysql version 5.0.45?

  And gives you an error about trying to connect to mysql 4.1 or lower?

  --
  Postgresql & php tutorials
  http://www.designmagick.com/

Re: Very old question: Mysql and old authentication

by Bugzilla from spam@network-technologies.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chris wrote:
> That's really confusing.
> It works against a mysql 5.1.36 but not against a mysql version 5.0.45?
> And gives you an error about trying to connect to mysql 4.1 or lower?

I have only seen this behavior when I use XAMPP on Windows and attempt
to connect to a different MySQL server then the one coming with XAMPP.
But I never bother to find out why because I had full access to MySQL
and could just create an account with the old password system.

--
John

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Very old question: Mysql and old authentication

by Andy Shellam (Mailing Lists)-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


>
> -Remote Server
> "old_passwords" "ON"
> "version" "5.0.45"

That's probably why - as I said in my previous e-mail, the mysqlng  
driver doesn't support the old authentication mechanism.  If you  
cannot change the remote server, you need to re-compile PHP with the  
MySQL client library (libmysql) instead of the PHP 5.3 native driver  
(mysqlng.)



Re: Very old question: Mysql and old authentication

by Niel Archer-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Recently we update our Local Server to this:
>
> Apache Version : 2.2.11  
> PHP Version : 5.3.0  
> MySQL Version : 5.1.36  
>
> All works fine locally, but when we want to connect to a Remote Mysql Server 5.0.45 just can't, we got the "mysqlnd cannot connect to MySQL 4.1+ using old authentication" msg
>
> The solution as i see is to use the OLD_PASSWORD trick, but in this case we can't do that because the Server is a Shared server and yada yada yada.. change some in the Remote Mysql Server is not an option
>
> I think Php must provide a solution for this but we can't found it
>
> We use SqlYog 6.05 to connect to Mysql Server's. Why it works with NEW and OLD algorithm and Php don't ?
>
> Any help on this please ?

The is an entry concerning this in 5.3.0 Backward Incompatible Changes
http://php.net/manual/en/migration53.incompatible.php

   The new mysqlnd library necessitates the use of MySQL 4.1's newer
  41-byte password format. Continued use of the old 16-byte passwords
   will cause mysql_connect() and similar functions to emit the error,
   "mysqlnd cannot connect to MySQL 4.1+ using old authentication."


The account you are trying to connect with is using an old password hash

Your options are limited, either
1) Compile PHP to use the libmysql library instead of mysqlnd
2) Have the password updated to use the newer hash.

Note The second option will prevent older clients connecting, including
the mysql extension (but not mysqli) if it is not using the mysqlnd
driver.


More information can be found in the MySQL manual on upgrading from v4.0
to v4.1
http://dev.mysql.com/doc/refman/4.1/en/upgrading-from-previous-series.html
http://dev.mysql.com/doc/refman/4.1/en/old-client.html

--
Niel Archer
niel.archer (at) blueyonder.co.uk



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php