mysql – logging in from command line

source: https://dev.mysql.com/doc/refman/5.0/en/connecting.html

shell> mysql -h [localhost] -u [username] -p[password] [database]

Password should not be used in the command line, wait for prompt.