The MySQL Command-Line Client

The MySQL command-line client is mysql, and it has the following syntax:

mysql [options] [database]

Some of the available options for mysql are discussed in Table 27.1. database is optional, and if given, it should be the name of the database to which you want to connect.

Table 27.1. Command-Line Options to Use When Invoking mysql

Image

More options are available than are listed in Table 27.1, but these are the most common options. See the man page for mysql for more information on the available options.

Caution

Although mysql allows you to specify the password on the command line after the -p option, and thus allows ...

Get Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.