Keep in mind that the users in MySQL are different and totally separate from the operating system users, even if they are named the same. So, when you are logged into the mysql command line system with the first account user ''@'localhost' you are starting the command line system without declaring a user. Try this:
shell> mysql -u root -p
Since you most likely have not set a password for the MySQL root user, simply press the enter key.
When you are failing to start the mysql command line system as the operating system root user, you still need to pass MySQL a username (as seen above).
The reason you can access the test datbase is that any databases or tables or anything that you are allowed to create as a particular user will be available to that user. And EVERYONE has access to the test database. That's why it's a good idea to drop that database as soon as you can.
There are lots of good resources out there on the Internet regarding getting started with MySQL. Here's one that I use every day: