MySql 中文参考指南
Chapter 5 Tutorial
目录
Table of Contents
本篇通过展示如何使用 mysql 客户端程序创建和使用简单数据库,提供了 MySQL 教程简介。 mysql (有时称为“终端监视器”或“监视器”)是一个交互式程序,它允许您连接到 MySQL 服务器、运行查询并查看结果。 mysql 也可以在批处理模式下使用:您事先将查询放入文件中,然后告诉 mysql 执行该文件的的内容。两种使用 mysql 的方法都在这里介绍。
This chapter provides a tutorial introduction to MySQL by showing how to use the mysql client program to create and use a simple database. mysql (sometimes referred to as the “terminal monitor” or just “monitor”) 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 tell mysql to execute the contents of the file. Both ways of using mysql are covered here.
$> mysql --help
本篇假设 mysql 已安装在您的设备上,并且有一个可供您连接的 MySQL 服务器。如果不是这种情况,请联系您的 MySQL 管理员。(如果 you 是管理员,则您需要查阅此手册的相关部分,如 Chapter 7, MySQL Server Administration 。)
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 7, 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.
由于本章本质上是教程,因此不可避免地会遗漏很多细节。有关此处涵盖主题的更多信息,请参阅手册的相关部分。
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.