By your post, you are on some Windows variant (2000/XP), and you have not set your root password (which is why 'mysql -u root' can get you in).
FYI -- you need to change the root password. This is a security hole that needs to be plugged.
I would also try :
Code:
mysql -u -p
OR
mysql -u '' -p
although I am not sure that will work.
Since you can get in with the root user, I would delete the anonymous account and recreate one for yourself.
mysql -u root
use mysql;
DELETE FROM user WHERE User = '';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'host' IDENTIFIED BY 'password' WITH GRANT OPTION;
Replace username with the username that you want to use.
Replace host with the computer that you want to connect from. Usually this is localhost.
Replace password with the password that you want to use.
Make sure that you include the single quotes in your statement!
HTH!