473,385 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Connection PHP4 <> Mysql ?

Hi all

Using Windows XP, PHP4.3.11 and Mysql 4.1.

Im a newbie to PHP and Mysql.
Im trying to connect to the database with this script:

<?php
//list_db.php

$link_id = mysql_connect("localhost", "phpuser", "phppass");
$result = mysql_list_dbs($link_id);
$num_rows = mysql_num_rows($result);

while($db_data = mysql_fetch_row($result)) {
echo $db_data[0]. "<BR>";
$result2 = mysql_list_tables($db_data[0]);
$num_rows2 = mysql_num_rows($result2);
while($table_data = mysql_fetch_row($result2)) echo "--" .
$table_data[0]. "<BR>";
echo "==> $num_rows2 table(s) in " . $db_data[0] . "<P>";
}
?>
But it gives me this error:Warning: mysql_connect(): Client does not support
authentication protocol requested by server; consider upgrading MySQL client
in c:\inetpub\wwwroot\PHP4info.php on line 5Warning: mysql_list_dbs():
supplied argument is not a valid MySQL-Link resource in
c:\inetpub\wwwroot\PHP4info.php on line 6Warning: mysql_num_rows(): supplied
argument is not a valid MySQL result resource in
c:\inetpub\wwwroot\PHP4info.php on line 7Warning: mysql_fetch_row():
supplied argument is not a valid MySQL result resource in
c:\inetpub\wwwroot\PHP4info.php on line 9What did I do wrong ?The database
is running well.Best regardsKlaus Hansen
Jul 17 '05 #1
3 2090
Klaus Hansen wrote:
Im a newbie to PHP and Mysql.
Im trying to connect to the database with this script: [...] But it gives me this error:Warning: mysql_connect(): Client does not support
authentication protocol requested by server; consider upgrading MySQL client What did I do wrong ?


This should be an FAQ here. ;-)

Use the --old-passwords option for the MySQL server. Check the MySQL
webpage for details.

http://dev.mysql.com/doc/mysql/en/old-client.html
Jul 17 '05 #2
your mysql module is for other versions not for 5, look for mysql module for
version 5
Client does not support

authentication protocol requested by server; consider upgrading MySQL client
--
bebbet.kicks-ass.net
up/up
1024
status: http://bebbet.kicks-ass.net/aa1/
Jul 17 '05 #3
or since your hosting a webserver on your pc and using xp and want to
have php, cgi, mysql, and more then i suggest you download this and it
comes with everything you need just click click and its done
installed..

http://prdownloads.sourceforge.net/a...2.exe?download

comes with PHP5 and MYSQL5 so good luck..

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Dan | last post by:
Workshop {Flash <-> PHP <-> MYSQL} 1-4 December 2003 in Milan (Italy) 4 full immersion days in a Flash/php/MySQL project start-up. The workshop is a unique opportunity for partecipants to...
2
by: pancho | last post by:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO on a Solaris 8 box - this module is needed to host some existing sites I will be migrating Note. I built PHP4 from source and...
1
by: Hanjo Grüßner | last post by:
Hello, is the mail() different in php4 vs. php5 ? I have a php-script sending mail. It works fine in php4. But it works not in php5 : No errors, only it sends no mail. Any suggestions ? ...
2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
7
by: Mathieu Maes | last post by:
Hi there I'm quite experienced in programming in PHP4, but I would like to make a step to PHP5. I created following class which works perfectly in PHP4 : Class Nessi { // ident part
5
by: fens | last post by:
I' ve a project using EJB and Mysql, but I don't know what to do !!. Cause I never using EJB before, Would you mind to help me ?. I' ve searching but i don't get any simple explanation about : 1>...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
5
by: FFMG | last post by:
Hi, Seen that support for PHP4 will be dropped at the end of the year I was thinking that maybe now might be a good time to start moving things. Is there a tutorial as to what I need to look...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.