Jump to content

Archived

This topic is now archived and is closed to further replies.

essjay_d12

cant get php to connect with mysql

Recommended Posts

Hi I am trying a simple connection string ....

<?php
$conn = mysql_connect("localhost", "admin", "adm1n");
echo $conn;
?>

then i get an error message when it is run....

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\Apache Group\Apache2\htdocs\dbConnect.php on line 2

I am running MySql server 5.0.18
apache 2.0.55
and php 4.3.3

What exactly is it asking me to upgrade?

the admin/adm1n user and password was granted all priviledges on a database called 'project' and the onyl table called 'users' (there is no root user or password)

I am new to all this, Please help

Thanks,

Simon

Share this post


Link to post
Share on other sites
I suggest you check out [a href=\"http://dev.mysql.com/doc/mysql/en/old-client.html\" target=\"_blank\"]this relevant refman page[/a] for more details.

Share this post


Link to post
Share on other sites
you don't declare a db in your connect statement

[code]
<?php
$sv = localhost;
$un = username;
$pw = password;
$db = database;


$link = mysqli_connect("$sv", "$un", "$pw", "$db");
?>

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.