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
database connection error
Moderator: General Moderators
-
mohamed essam
- Forum Newbie
- Posts: 5
- Joined: Sun Dec 20, 2009 5:19 pm
Re: database connection error
plz any one can give me steps to fix this problem
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Re: database connection error
your password is wrong.