Whats wrong here?

A

Anonymous

Guest
Hi please help me..i think something is wrong with my php.ini..i always got these error message

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'localhost' (using password: YES) in c:\webs\test\connect.php5 on line 5
Connect Error: Access denied for user 'admin'@'localhost' (using password: YES)


Here is my code in my connect.php5

Code:
<html>
<head><title>Connect Server</title></head>
<body>
<?
$link = mysql_connect("localhost",$_POST['username'],$_POST['password'])or die("Connect 

Error: ".mysql_error());
print "Successfully connected.\n";
mysql_close($link);
?>
</body>
</html>
 
Put user name and password in " " or you have mysql configuration problem.
 
Still the same error. I think it is in my msysl configuration file. I havent edited anything in my ini file. can u please help me what should be done in order for mysql connect with php...thanks a lot
 
did you add any user or anything? if not: try connecting to the server with root and no password
what mysql version are you running?
 
Back
Top