5.1. Overview of Server-Side Programs
The MySQL server, mysqld, is the main program
that does most of the work in a MySQL installation. The server is
accompanied by several related scripts that perform setup
operations when you install MySQL or that assist you in starting
and stopping the server. This section provides an overview of the
server and related programs. The following sections provide more
detailed information about each of these programs.
Each MySQL program takes many different options. Most programs
provide a --help
option that you can use to get a
description of the program's different options. For example, try
mysqld --help.
You can override default option values for MySQL programs by
specifying options on the command line or in an option file.
Section 4.3, “Specifying Program Options”.
The following list briefly describes the MySQL server and
server-related programs:
-
mysqld
The SQL daemon (that is, the MySQL server). To use client
programs, mysqld must be running, because
clients gain access to databases by connecting to the server.
See Section 5.2, “mysqld — The MySQL Server”.
-
mysqld_safe
A server startup script. mysqld_safe
attempts to start mysqld. See
Section 5.3.1, “mysqld_safe — MySQL Server Startup Script”.
-
mysql.server
A server startup script. This script is used on systems that
use System V-style run directories containing scripts that
start system services for particular run levels. It invokes
mysqld_safe to start the MySQL server. See
Section 5.3.2, “mysql.server — MySQL Server Startup Script”.
-
mysqld_multi
A server startup script that can start or stop multiple
servers installed on the system. See
Section 5.3.3, “mysqld_multi — Manage Multiple MySQL Servers”. An alternative to
mysqld_multi is
mysqlmanager
, the MySQL Instance Manager.
instead of mysqld_multi
. See
Section 5.4, “mysqlmanager — The MySQL Instance Manager”.
-
mysql_install_db
This script creates the MySQL database and initializes the
grant tables with default privileges. It is usually executed
only once, when first installing MySQL on a system. See
Section 2.9.2, “Unix Post-Installation Procedures”.
-
mysql_fix_privilege_tables
This program is used after a MySQL upgrade operation. It
updates the grant tables with any changes that have been made
in newer versions of MySQL. See
Section 5.5.1, “mysql_fix_privilege_tables — Upgrade MySQL System Tables”.
Note: As of MySQL 5.1.7, this program has been superseded by
mysql_upgrade.
-
mysql_upgrade
This program is used after a MySQL upgrade operation. It
checks tables for incompatibilities and repairs them if
necessary, and updates the grant tables with any changes that
have been made in newer versions of MySQL. See
Section 5.5.2, “mysql_upgrade — Check Tables for MySQL Upgrade”.
-
mysqlmanager
The MySQL Instance Manager, a program for monitoring and
managing MySQL servers. See
Section 5.4, “mysqlmanager — The MySQL Instance Manager”.
There are several other programs that are run on the server host: