Previous Section  < Day Day Up >  Next Section

10.1 Client/Server Overview

MySQL operates using a client/server architecture. The server is the central program that manages database contents. The client programs connect to the server to retrieve or modify data. MySQL also includes nonclient utility programs and scripts. Thus, a complete MySQL installation consists of three general categories of programs:

  • The server. This is the mysqld program that manages databases and tables. If you do not build MySQL from source, you should choose a binary (precompiled) distribution that includes a server with the capabilities you need. The types of distributions available are discussed in the "Core Study Guide."

  • Client programs. These programs communicate with the server by sending requests to it over a network connection. The server acts on each request and returns a response to the client. For example, you can use the mysql client to send queries to the server, and the server returns the query results. The client programs included with MySQL distributions are character-based programs that display output to your terminal. Another client, MySQLCC (MySQL Control Center), provides a graphical interface for interacting with the server. MySQLCC is not included with MySQL distributions but can be obtained from the MySQL AB Web site. Section 10.2, "Choosing the Right Client," describes clients that are particularly important for administrative purposes.

  • Utility programs. These programs are generally used for special purposes and do not act as clients of the server. That is, they do not connect over the network to the server. For example, mysqld_safe is a script for starting up and monitoring the server. It invokes the server directly. myisamchk is a standalone utility for table checking and repair. It accesses or modifies table files directly. Utilities such as myisamchk must be used with care to avoid unintended interaction with the server. If table files are used by two programs at the same time, it's possible to get incorrect results or even to cause table damage.

    Previous Section  < Day Day Up >  Next Section