Open command prompt and type:
Code:
cd\mysql\bin
mysql -u root mysql
use db;
grant all privileges on *.* to user@localhost identified by 'password' with grant option;
quit
exit
Replace db with your database name, replace user with your username, and replace password with your password. Now try and it should connect fine.