database connection error
Posted: Fri Dec 25, 2009 2:52 pm
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
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