Documentation Home
MySQL Tutorial
Related Documentation Download this Excerpt
PDF (US Ltr) - 199.2Kb
PDF (A4) - 200.1Kb


MySQL Tutorial  /  Tutorial

Chapter 1 Tutorial

This chapter provides a tutorial introduction to MySQL by showing how to use themysql client program to create and use a simple database.mysql (sometimes referred to as theterminal monitor or justmonitor) is an interactive program that enables you to connect to a MySQL server, run queries, and view the results.mysql may also be used in batch mode: you place your queries in a file beforehand, then tellmysql to execute the contents of the file. Both ways of usingmysql are covered here.

To see a list of options provided bymysql, invoke it with the--help option:

$> mysql --help

This chapter assumes thatmysql is installed on your machine and that a MySQL server is available to which you can connect. If this is not true, contact your MySQL administrator. (Ifyou are the administrator, you need to consult the relevant portions of this manual, such asMySQL Server Administration.)

This chapter describes the entire process of setting up and using a database. If you are interested only in accessing an existing database, you may want to skip the sections that describe how to create the database and the tables it contains.

Because this chapter is tutorial in nature, many details are necessarily omitted. Consult the relevant sections of the manual for more information on the topics covered here.