A system administrator or DBA may need to connect quite often to a MySQL database from the command line, to perform administration and optimization tasks, and such. The common way to connect is executing the mysql client, with a set of arguments to specify the user and password to use, as well as the host, database and port where the instance is listening.
This post explains how to specify de defaults for all these arguments in a configuration file, to avoid having to type it again and again, every time a new connection to the database needs to be made.