Table of Contents目录
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客户端程序创建和使用简单数据库,提供了MySQL的教程介绍。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(有时称为“终端监视器”或“监视器”)是一个交互式程序,可用于连接mysql服务器、运行查询和查看结果。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. mysql也可以在批处理模式下使用:您预先将查询放入一个文件中,然后告诉mysql执行该文件的内容。Both ways of using mysql are covered here.这里介绍了使用mysql的两种方法。
To see a list of options provided by mysql, invoke it with the 要查看mysql提供的选项列表,请使用--help
option:--help
选项调用它:
shell> mysql --help
This chapter assumes that mysql is installed on your machine and that a MySQL server is available to which you can connect. 本章假设您的计算机上安装了mysql,并且您可以连接到mysql服务器。If this is not true, contact your MySQL administrator. 如果不是这样,请与MySQL管理员联系。(If you are the administrator, you need to consult the relevant portions of this manual, such as Chapter 5, MySQL Server Administration.)(如果您是管理员,则需要参考本手册的相关部分,如第5章,“MySQL服务器管理”。)
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.有关此处所涵盖主题的更多信息,请参阅手册的相关章节。