0

hallo to all web developers, I am having this problem. . .what does it mean? This happen everytime I put username and password on my sql database. . .Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'localhost' (using password: YES) in C:\xampp\htdocs\sample\index.php on line 2
Access denied for user 'admin'@'localhost' (using password: YES)

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by nagatron
0

Either the password you are using is wrong, or there is no permission for user 'admin' on local machine to access the database.

Check your username/password for the DB and also check the user has got the correct permissions.

0

It may sound daft, but I spent a week, when starting out, trying to connect as 'admin' when I should have used 'root'.

0

Thank you for the help guys, solve at last. . .I use the root in the username and leave the password blank.

it looks like this:

$con = mysql_connect("localhost","root"," ");

Edited by nagatron: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.