Directly access a MySQL database from the terminal.
mysql -uUSERNAME -pPASSWORD
A successful login attempt will show a message similar to the following.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 123
Server version: 5.5.35 MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
A login attempt with a wrong password, or incorrect username will show a message like below.
ERROR 1045 (28000): Access denied for user 'USERNAME '@'localhost' (using password: YES)
A login attempt without putting a required password will have a similar message like below.
ERROR 1045 (28000): Access denied for user 'USERNAME '@'localhost' (using password: NO)