$ mysql -h 127.0.0.1 -P 3306 -u root -p
You can also use telnet to check the connectivity:
$telnet 127.0.0.1 3306
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
J
5.6.21 81/8j0O?Am$fZn<||}~!mysql_native_password
!#08S01Got packets out of orderConnection closed by foreign host.