PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5
This section discusses methods for starting and stopping the MySQL server.
Generally, you start themysqld server in one of these ways:
Invokemysqld directly. This works on any platform.
On Windows, you can set up a MySQL service that runs automatically when Windows starts. SeeSection 2.3.4.8, “Starting MySQL as a Windows Service”.
On Unix and Unix-like systems, you can invokemysqld_safe, which tries to determine the proper options formysqld and then runs it with those options. SeeSection 4.3.2, “mysqld_safe — MySQL Server Startup Script”.
On Linux systems that support systemd, you can use it to control the server. SeeSection 2.5.10, “Managing MySQL Server with systemd”.
On systems that use System V-style run directories (that is,
/etc/init.dand run-level specific directories), invokemysql.server. This script is used primarily at system startup and shutdown. It usually is installed under the namemysql. Themysql.server script starts the server by invokingmysqld_safe. SeeSection 4.3.3, “mysql.server — MySQL Server Startup Script”.On macOS, install a launchd daemon to enable automatic MySQL startup at system startup. The daemon starts the server by invokingmysqld_safe. For details, seeSection 2.4.3, “Installing a MySQL Launch Daemon”. A MySQL Preference Pane also provides control for starting and stopping MySQL through the System Preferences. SeeSection 2.4.4, “Installing and Using the MySQL Preference Pane”.
On Solaris, use the service management framework (SMF) system to initiate and control MySQL startup.
systemd, themysqld_safe andmysql.server scripts, Solaris SMF, and the macOS Startup Item (or MySQL Preference Pane) can be used to start the server manually, or automatically at system startup time. systemd,mysql.server, and the Startup Item also can be used to stop the server.
The following table shows which option groups the server and startup scripts read from option files.
Table 2.15 MySQL Startup Scripts and Supported Server Option Groups
| Script | Option Groups |
|---|---|
| mysqld | [mysqld],[server],[mysqld- |
| mysqld_safe | [mysqld],[server],[mysqld_safe] |
| mysql.server | [mysqld],[mysql.server],[server] |
[mysqld- means that groups with names likemajor_version][mysqld-5.6] and[mysqld-5.7] are read by servers having versions 5.6.x, 5.7.x, and so forth. This feature can be used to specify options that can be read only by servers within a given release series.
For backward compatibility,mysql.server also reads the[mysql_server] group andmysqld_safe also reads the[safe_mysqld] group. To be current, you should update your option files to use the[mysql.server] and[mysqld_safe] groups instead.
For more information on MySQL configuration files and their structure and contents, seeSection 4.2.2.2, “Using Option Files”.
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 256.4Kb
Man Pages (Zip) - 361.2Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
MySQL Globalization
MySQL Information Schema
MySQL Installation Guide
MySQL and Linux/Unix
MySQL and macOS
MySQL Partitioning
MySQL Performance Schema
MySQL Replication
Using the MySQL Yum Repository
MySQL Restrictions and Limitations
Security in MySQL
MySQL and Solaris
Building MySQL from Source
Starting and Stopping MySQL
MySQL Tutorial
MySQL and Windows
MySQL NDB Cluster 7.5