To access MySQL from the command line:
This can be shortened to:
By omitting the password value MySQL will ask for any required password as the first input. If you specify password the client will give you an 'insecure' warning:
For local connections --socket can be used to point to the socket file:
Omitting the socket parameter will cause the client to attempt to attach to a server on the local machine. The server must be running to connect to it.