Starting and Stopping MariaDB

There are several different methods to start or stop the MariaDB Server process. There are two primary categories that most of these methods fall into: starting the process with the help of a service manager, and starting the process manually.

Service Managers

sysVinit and systemd are the most common Linux service managers. launchd is used in MacOS X. Upstart is a less common service manager.

Systemd

RHEL/CentOS 7 and above, Debian 8 Jessie and above, and Ubuntu 15.04 and above use systemd by default.

For information on how to start and stop MariaDB with this service manager, see systemd: Interacting with the MariaDB Server Process.

SysVinit

RHEL/CentOS 6 and below, and Debian 7 Wheezy and below use sysVinit by default.

For information on how to start and stop MariaDB with this service manager, see sysVinit: Interacting with the MariaDB Server Process.

launchd

launchd is used in MacOS X.

Upstart

Ubuntu 14.10 and below use Upstart by default.

Starting the Server Process Manually

mysqld

mysqld is the actual MariaDB Server binary. It can be started manually on its own.

mysqld_safe

mysqld_safe is a wrapper that can be used to start the mysqld server process. The script has some built-in safeguards, such as automatically restarting the server process if it dies. See mysqld_safe for more information.

mysqld_multi

mysqld_multi is a wrapper that can be used to start the mysqld server process if you plan to run multiple server processes on the same host. See mysqld_multi for more information.

mysql.server

mysql.server is a wrapper that works as a standard sysVinit script. However, it can be used independently of sysVinit as a regular sh script. The script starts the mysqld server process by first changing its current working directory to the MariaDB install directory and then starting mysqld_safe. The script requires the standard sysVinit arguments, such as start, stop, and status. See mysql.server for more information.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/starting-and-stopping-mariadb-automatically/