The MySQL Terminal Monitor

This section provides an introduction to using the MySQL client program mysql, also referred to as the terminal monitor, or simply the monitor. The monitor is an interactive program that allows you to connect to the MySQL server and run queries. There is also a batch mode for the monitor, which is where you place your queries in a file beforehand, and then tell the monitor to execute the contents of the file.

Connecting to the Database

To connect to the server, you need a MySQL username and password. Additionally, if the server is running on a machine other than the computer you are currently connected to, you need to provide the hostname of the machine's server. Once you know the parameters, you should be able to connect ...

Get Sams Teach Yourself SQL in 21 Days, Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.