Name

mysqld_safe

Synopsis

mysqld_safe [options]

Use this to start the MySQL server and to restart automatically it if it dies unexpectedly. By default, the script will first attempt to start mysqld-max. If mysqld-max is not installed on the server, it will then start mysqld instead. Although options may be entered from the command line, to ensure that any options that are to be passed to the daemon are used when it’s reloaded after a crash, they should be included in a configuration file (e.g., my.cnf). There are just a few options (listed here) relative to the mysqld_safe script. They should be included in the configuration file under the heading [mysqld_safe] but without the leading double dashes. In previous distributions of MySQL, this script was named safe_mysqld.

--basedir= path

Specifies the path to the MySQL installations.

--core-file-size= size

Specifies the maximum size of the core file to create if the daemon dies.

--datadir= path

Specifies the directory which contains datafiles (i.e, table files).

--defaults-extra-file= path

Specifies an additional configuration file to use after the default file is read.

--defaults-file= path

Specifies the path to the default configuration file for the server.

--err-log= path

Specifies the path to the error log for error messages outside of the daemon, such as errors when starting.

--ledir= path

Specifies the path where the daemons may be found.

--log-error= filename

Enables logging of error messages and server startup messages to the ...

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.