mysqld_safe [options]

mysqld_safe is recommended utility for starting the MySQL server because the server is restarted automatically if it dies unexpectedly. The utility is available on Unix and Novell NetWare systems.

Although options may be entered from the command line, they should be included in the options file (e.g., my.cnf) under the heading [mysqld_safe]. Options specific to mysqld_safe should not be passed on the command line because they will be passed to the mysqld server, which will try to interpret them. Therefore, options are shown here as they would appear in the configuration file, without initial hyphens. mysqld_safe can also accept options for the mysqld server, but the configuration file is also better for these because it ensures they will be passed to the daemon when it’s reloaded after a crash:


On Novell NetWare systems, when mysqld_safe closes, the related screen does not close automatically without user interaction. Use this option to have the screen close automatically.


This option is necessary and is used to specify the path to the directory where MySQL files are installed.


This option sets the maximum size set for the core file to create if the daemon dies.


This option specifies the directory that contains datafiles (i.e., table files).


This option specifies an additional options file to use after the default file is read. When used at the command line, this ...

Get MySQL in a Nutshell, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.