Can't connect to a MySQL from the command line (works from MySQL Workbench)
As 'ypercube' commented, log in from both connections to tell which user is connecting. You should see differences when you run SELECT USER(),CURRENT_USER(); and SHOW GRANTS;

You are logging in but you will need to GRANT permissions (from your root account) to your @'localhost' account to gain access to your four schemas. (ref. http://dev.mysql.com/doc/refman/5.1/en/grant.html)

If this is not being used for testing, it would be adviseable to secure/drop anonymous accounts that are typically set-up with MySql if you don't intend to use them. (ref. http://dev.mysql.com/doc/refman/5.5/en/default-privileges.html)