MySQL 5.7 参考手册  /  第 3 章教程

第 3 章教程

本章通过展示如何使用mysql客户端程序创建和使用一个简单的数据库来提供 MySQL 的教程介绍。mysql(有时称为终端监视器或 简称为监视器)是一个交互式程序,使您能够连接到 MySQL 服务器、运行查询并查看结果。 mysql也可以在批处理模式下使用:您预先将查询放在一个文件中,然后告诉 mysql执行该文件的内容。此处介绍了两种使用mysql的方法。

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

$> mysql --help

This chapter assumes that mysql 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. (If you are the administrator, you need to consult the relevant portions of this manual, such as Chapter 5, MySQL 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.

因为本章是教程性质的,所以很多细节是必要省略的。有关此处涵盖的主题的更多信息,请参阅手册的相关部分。