The mysql client program enables the user to send queries to the MySQL server and receive their results. It can be used interactively or it can read query input from a file in batch mode.
Interactive mode is useful for day-to-day usage, for quick one-time queries, and for testing how queries work.
Batch mode is useful for running queries that have been prewritten and stored in a file. It's especially valuable for issuing a complex series of queries that's difficult to enter manually, or queries that need to be run automatically by a job scheduler without user intervention.