Page 1 of 1

database connection error

Posted: Fri Dec 25, 2009 2:52 pm
by mohamed essam
hello every one

please can any one fix this error please?

my error is when i made connection to mysql database i found this error(Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root '@'localhost' (using password: YES) )

i have tried to fix it with many ways but this ways couldn't be successful

please i want to know a correct solution for this error

my php code is:

<?php


$link = mysql_connect("localhost", "root ","mohamed");
if (!$link) {
die('Could not connect: ' );
}
echo 'Connected successfully';
mysql_close($link);
?>

i will wait any reply

thank you in advanced

Re: database connection error

Posted: Fri Dec 25, 2009 2:53 pm
by mohamed essam
plz any one can give me steps to fix this problem

Re: database connection error

Posted: Sun Dec 27, 2009 1:21 am
by daedalus__
your password is wrong.