473,624 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_tabl es($db_data[0]);
$num_rows2 = mysql_num_rows( $result2);
while($table_da ta = 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\wwwr oot\PHP4info.ph p on line 5Warning: mysql_list_dbs( ):
supplied argument is not a valid MySQL-Link resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 6Warning: mysql_num_rows( ): supplied
argument is not a valid MySQL result resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 7Warning: mysql_fetch_row ():
supplied argument is not a valid MySQL result resource in
c:\inetpub\wwwr oot\PHP4info.ph p on line 9What did I do wrong ?The database
is running well.Best regardsKlaus Hansen
Jul 17 '05 #1
3 2106
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
3168
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 increase their experience in interactions between visual creativity and dynamic applications. It's a study and research about interaction between visual creativity and dynamic applications, trought a real web project developement.
2
2568
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 it loads without an error. When I try t run "apachectl configtest" I get the following error: -- Cannot load /usr/local/apache/libexec/libphp3.so into server: ld.so.1: /usr/local/apache/bin/httpd: fatal: relocation error: file...
1
1595
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 ? TIA
2
3209
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 writing one object in C# which will take the entire table tag contents and renders. Ie., we need to pass "<table>………… <thead>……</thead>. <tr>.<td> <td>..<tr>.<td> <td> </table>" content to
2
10555
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 type="text/javascript"> <!]> </script> <script type="text/javascript"
7
1727
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
4809
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> How to connect EJB to MySql. 2> About EJB itself. 3> Tutorial about EJB n MySql. I Hope You Can Help Me ! Thank You, for everything
3
3366
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, &gt ,&ltCompany&gt to display '<', '>' and '<Company>' respectively. But is there any freeware code available which could implement the above functionality without having to use &gt,&lt and such stuff???
5
2353
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 out for? And, Could I run both version on my test server? Or do I need to have to Apache servers running?
0
8680
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2610
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.