Why we should use systemd to manage mysql daemon:
- systemd is the System Management Deamon.
- systemd provides standards for controlling the Linux boot process
- systemd is intended to replace init start-up scripts for boot process, monitoring and automatic restarts in the event of a service failure/termination
- Starting with MySQL 5.7.6, process monitoring and auto-restarts are now handled by systemd on systems that have it
- If mysqld fails due to a restartable failure like a crash, then systemd automatically restarts mysqld
- multiple services are able to start at same time, improving boot times
- You can pass other custom options to mysqld by creating additional entries/lines in /etc/sysconfig/mysql using the MYSQLD_OPTS=”option” format
- You can also specify custom options and environment variables using the systemctl command:
$ systemctl set-environment MYSQLD_OPTS="--general_log=1"
The custom options can also be unset using:
$ systemctl unset-environment MYSQLD_OPTS - mysqld.service: This is the systemd service definition file that tells it what service to start, specifies auto-restart settings, type of service it is and all of the dependencies between various units, etc.
Comments
Post a Comment