sqlwamp

DB Access denied


Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'localhost' (using password: YES) in C:\wamp\www\connect.php on line 6

I've looked for a solution but haven't been able to find one. The part on line 6 is mysql_connect($server,$username,$password)

If it has to do with the problem, I'm using WampServer 2.1


Solution

  • Users admin@% and admin@localhost can have different passwords in MySQL. Try without a password.

    Check the contents of the mysql.user table to see if your have multiple user records for admin.

    This is a nice access model which allows different access depending on server the user is connecting from.