Database Reference
In-Depth Information
This method is the same for both MySQL and MariaDB, and it starts the
mysqld_safe
dae-
mon, which will in turn start the server daemon,
mysqld
. If the
mysqld
daemon crashes,
mysqld_safe
will restart it. The ampersand at the end of the line instructs the shell to run
the daemon in the background. This way you can exit the server and it will continue to run
without you staying connected.
To have MySQL or MariaDB started at boot time, copy the
mysql.server
file, located in
the
support-files
subdirectory of
/usr/local/mysql
, to the
/etc/init.d
directory. To do this,
enter the following from the command line:
cp support-files/mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql
chkconfig --add mysql
The first line follows a convention of placing the startup file for the server in the server's
initial daemons directory with the name,
mysql
. The second command makes the file ex-
ecutable. The third sets the run level of the service for
startup
and
shutdown
. All of this is
the same for MariaDB.
At this point, MySQL or MariaDB is installed and running. All that remains now are some
post-installation adjustments, as explained in thenext section.