Home > Archive > MySQL ODBC Connector > January 2006 > Support between MySQL and PHP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Support between MySQL and PHP
Philip R. Thompson

2006-01-29, 1:23 pm

Hi all.

I figured this question was suitable for both the MySQL list and the
PHP-General list. Here's what I'm running into.

I just installed MySQL5 and currently have PHP 4.3.11 installed. I
am wanting to connect to the mysql database on localhost, but I
get the following results:

----------
<? $link = mysql_connect('local
host', 'user', 'password'); ?>
"Client does not support authentication protocol requested by
server; consider upgrading MySQL client"
----------

Well, I have the lastest stable version of MySQL, so I did some more
research on what the problem might be. When I checked my
information for PHP using phpinfo(), it gave me the "Client API
version" for MySQL was 3.23.49. So, I'm thinking my version of PHP
cannot connect to my version of MySQL. I then considered if I
installed the MySQLi extension for PHP (supports versions of MySQL

> 4.1), would that help me? Or, if I just upgraded PHP to version 5,

would that help me?

Does anyone have any suggestions on the direction I should go?

Thanks in advance,
~Philip


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

mysql@karsites.net

2006-01-29, 8:23 pm


Hi Philip. I'm wondering if you have mysql server version
3.23.49 still running on your machine?

If so, version 5 would not start up, as it would not
be allowed access to port 3306.

Try doing

my_print_defaults mysqld

and my_print_defaults client mysql

from a root shell and see what values you get returned.

HTH

Keith

In theory, theory and practice are the same;
In practice they are not.

On Sun, 29 Jan 2006, Philip R. Thompson wrote:

> To: mysql@lists.mysql.com, php-general@lists.php.net
> From: Philip R. Thompson <prthomp@uark.edu>
> Subject: Support between MySQL and PHP
>
> Hi all.
>
> I figured this question was suitable for both the MySQL list and the
> PHP-General list. Here's what I'm running into.
>
> I just installed MySQL5 and currently have PHP 4.3.11 installed. I
> am wanting to connect to the mysql database on localhost, but I
> get the following results:
>
> ----------
> <? $link = mysql_connect('local
host', 'user', 'password'); ?>
> "Client does not support authentication protocol requested by
> server; consider upgrading MySQL client"
> ----------
>
> Well, I have the lastest stable version of MySQL, so I did some more
> research on what the problem might be. When I checked my
> information for PHP using phpinfo(), it gave me the "Client API
> version" for MySQL was 3.23.49. So, I'm thinking my version of PHP
> cannot connect to my version of MySQL. I then considered if I
> installed the MySQLi extension for PHP (supports versions of MySQL
> would that help me?
>
> Does anyone have any suggestions on the direction I should go?
>
> Thanks in advance,
> ~Philip

k

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

James Harvard

2006-01-30, 7:23 am

MySQL versions >= 4.1 use a new, more secure authentication protocol. Probably the version of PHP you are using does not support it.

Ah, here it is:
http://dev.mysql.com/doc/refman/5.0...rd-hashing.html

HTH,
James Harvard

At 1:18 pm -0600 29/1/06, Philip R. Thompson wrote:
>I just installed MySQL5 and currently have PHP 4.3.11 installed. I
>am wanting to connect to the mysql database on localhost, but I
>get the following results:
>
>----------
><? $link = mysql_connect('local
host', 'user', 'password'); ?>
>"Client does not support authentication protocol requested by
>server; consider upgrading MySQL client"
>----------
>
>Well, I have the lastest stable version of MySQL, so I did some more
>research on what the problem might be. When I checked my
>information for PHP using phpinfo(), it gave me the "Client API
>version" for MySQL was 3.23.49. So, I'm thinking my version of PHP
>cannot connect to my version of MySQL. I then considered if I
>installed the MySQLi extension for PHP (supports versions of MySQL
>would that help me?


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Philip Thompson

2006-01-30, 9:25 am

Thanks to everyone's help. Instead of downgrading MySQL, I went ahead
and upgraded to PHP5. After I did that, it seemed to fix the
connection issue I was having.

~Philip


On Jan 30, 2006, at 4:41 AM, James Harvard wrote:
[color=darkred]
> MySQL versions >= 4.1 use a new, more secure authentication
> protocol. Probably the version of PHP you are using does not
> support it.
>
> Ah, here it is:
> http://dev.mysql.com/doc/refman/5.0...rd-hashing.html
>
> HTH,
> James Harvard
>
> At 1:18 pm -0600 29/1/06, Philip R. Thompson wrote:

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

George Law

2006-01-30, 11:24 am

=20
Phillip,

You probably didn't need to upgrade - just set the mysql password to use
"old_password":

FTFM: =20

"As indicated earlier, a danger in this scenario is that it is possible
for accounts that have a short password hash to become inaccessible to
pre-4.1 clients. A change to such an account's password made via GRANT,
PASSWORD(), or SET PASSWORD results in the account being given a long
password hash. From that point on, no pre-4.1 client can authenticate to
that account until the client upgrades to 4.1.

To deal with this problem, you can change a password in a special way.
For example, normally you use SET PASSWORD as follows to change an
account password:

SET PASSWORD FOR 'some_user'@'some_ho
st' =3D PASSWORD('mypass');

To change the password but create a short hash, use the OLD_PASSWORD()
function instead:

SET PASSWORD FOR 'some_user'@'some_ho
st' =3D OLD_PASSWORD('mypass
');

OLD_PASSWORD() is useful for situations in which you explicitly want to
generate a short hash. "

So, you could have just updated the password using :

SET PASSWORD FOR 'some_user'@'some_ho
st' =3D OLD_PASSWORD('mypass
');





> -----Original Message-----
> From: Philip Thompson & #91;mailto:prthomp@u
ark.edu]=20
> Sent: Monday, January 30, 2006 9:33 AM
> To: mysql@lists.mysql.com
> Subject: Re: Support between MySQL and PHP
>=20
> Thanks to everyone's help. Instead of downgrading MySQL, I=20
> went ahead and upgraded to PHP5. After I did that, it seemed=20
> to fix the connection issue I was having.
>=20
> ~Philip
>=20
>=20
> On Jan 30, 2006, at 4:41 AM, James Harvard wrote:
>=20
> protocol.=20
> installed. I am=20
> I get the=20
> by server;=20
> some more=20
> information=20
> cannot connect=20
> the MySQLi=20
> would that help=20
>=20
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: =20
> http://lists.mysql.com/mysql? unsub...h
ere.net

>=20
>=20


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com