Take the 2-minute tour ×

I am using XAMMP, PHPMyAdmin, Notepad++ on a Windows 7 computer (64-bit).

I am attempting to make a login page for my website, using this tutorial: http://net.tutsplus.com/tutorials/php/create-a-signup-form-with-email-confirmation/

However, I get this error:

Warning: mysql_connect(): Access denied for user 'username'@'localhost' (using password: YES) in ...\XAMPP\htdocs\EP\inc\php\config.php on line 4 I couldn't connect to your database, please make sure your info is correct!

This is my code:

//connect to the database
mysql_select_db('registration') or die("I couldn't find the database table ($table) make sure it's spelt right!");

I have absolutely no idea what username and password are supposed to mean and I am unsure if the 'localhost' is supposed to be my IP.

share|improve this question
We need to see your code, but, localhost is ok to your local connection, try changing your user to "root" (without quotes) and password empty (or "root" too if empty doesn´t work) –  Duver Jaramillo Oct 27 '13 at 3:27

1 Answer 1

up vote 0 down vote accepted

try putting the data thus:

mysql_connect ('localhost', 'root','') or die ("here you put whatever you want");

Usually this is the default access.

share|improve this answer

Your Answer


