MySQL operates in a networked environment using a client/server architecture. In other words, a central program acts as a server, and various client programs connect to the server to make requests. A MySQL installation has the following major components:
MySQL Server, or
mysqld, is the database server program. The server manages access to the actual databases on disk and in memory. MySQL Server is multi-threaded and supports many simultaneous client connections. Clients can connect via several connection protocols. For managing database contents, MySQL Server features a modular architecture that supports multiple storage engines that handle different types of tables (for example, it provides both transactional and non-transactional tables).
mysqldcomes in several configurations. MySQL Max distributions contain a server named
mysqld-maxthat includes features that are not built into the non-Max version, such as support for additional storage engines. On Windows, the
mysql-max-ntservers provide support for named-pipe connections on Windows NT, 2000, XP, and 2003. If a given installation includes multiple server programs, you pick one to run from among those available.
The exact feature configuration of MySQL Server may change over time, so whenever you download a new version, it's wise to check the documentation. For the purposes of the exam, the preceding information suffices.
As you read this guide, please keep in mind the difference between a server and a host. The server is software (the MySQL server program
mysqld). Server characteristics include its version number, whether certain features are included or excluded, and so forth. The host is the physical machine on which the server program runs. Host characteristics include its hardware configuration, the operating system running on the machine, its network addresses, and so forth.
Client programs. These are programs that you use for communicating with the server to manipulate the information in the databases that the server manages. MySQL AB provides several client programs. The following list describes a few of them:
MySQL Query Browser and MySQL Administrator are graphical front ends to the server.
mysqlis a command-line program that acts as a text-based front end for the server. It's used for issuing queries and viewing the results interactively from a terminal window.
Other command-line clients include
mysqlimportfor importing data files,
mysqldumpfor making backups,
mysqladminfor server administration, and
mysqlcheckfor checking the integrity of the database files.
MySQL non-client utilities. These are programs that act independently of the server. They do not operate by first establishing a connection to the server.
myisamchkis an example. It performs table checking and repair operations. Another program in this category is
myisampack, which creates compressed read-only versions of
MyISAMtables. Both utilities operate by accessing
MyISAMtable files directly, independent of the
MySQL runs on many varieties of Windows, Unix, and Linux, but client/server communication is not limited to environments where all computers run the same operating system. Client programs can connect to a server running on the same host or a different host, and the client and server host need not have the same operating system. For example, client programs can be used on Windows to connect to a server that is running on Linux.
Most of the concepts discussed here apply universally to any system on which MySQL runs. Platform-specific information is so indicated. Unless otherwise specified, "Unix" as used here includes Linux and other Unix-like operating systems.