Page 1 of 1

can't get any php script to connect with mysql

Posted: Wed May 03, 2006 10:27 am
by user51564
can get a pel scipt to connect but not php scripts...do i need to know the socket? says it can not authninicate....

error i get with php scripts...

Posted: Wed May 03, 2006 11:00 am
by user51564
i get this error: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Posted: Wed May 03, 2006 11:49 am
by feyd
What version is MySQL and what version of the client are you using? phpinfo() has the client details.

here is the info...

Posted: Wed May 03, 2006 11:59 am
by user51564
MySQL 5.0
os winxp pro sp2
apache 2.55
php 4
Array ( [0] => standard [1] => bcmath [2] => calendar [3] => ctype [4] => com [5] => ftp [6] => mysql [7] => odbc [8] => overload [9] => pcre [10] => session [11] => tokenizer [12] => xml [13] => wddx [14] => zlib [15] => apache2handler [16] => mbstring [17] => bz2 [18] => cpdf [19] => crack [20] => curl [21] => db [22] => dba [23] => dbase [24] => dbx [25] => exif [26] => filepro [27] => gd [28] => hyperwave [29] => imap [30] => ldap [31] => mime_magic [32] => ming [33] => pdf [34] => pgsql [35] => sockets [36] => Win32 API [37] => zip )

Posted: Wed May 03, 2006 12:02 pm
by feyd
You need to use MySQLi to connect to MySQL 5.

php.ini

Posted: Wed May 03, 2006 12:27 pm
by user51564
is this right?

Code: Select all

; Allow or prevent persistent links.
mysql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mysql.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no limit.
mysql.max_links = -1

; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysql.default_port = 3306

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host = "localhost" 

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user = "root"

Posted: Tue May 09, 2006 7:19 am
by dibyendrah
The problem is due to the old MySQL Client .
Go through this URL http://dev.mysql.com/doc/refman/5.0/en/old-client.html .

Cheers,
Dibyendra