MySQL 5.5.16 allows anonymous connections

Solution 1:

You need to simply remove the anonymous user.

In the future, running /usr/bin/mysql_secure_installation (Location in RPM Installation) will prompt you to remove these anonymous users.

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.

Remove anonymous users? [Y/n] y ... Success!

Solution 2:

Remove the user entry with the empty username. It is the cause. Use select user(); when logged in to verify that it's the user that you logged in as.

See here:

Some accounts are for anonymous users. These have an empty user name. The anonymous accounts have no password, so anyone can use them to connect to the MySQL server.