The mysql.server and safe_mysqld scripts can be used to start/stop the server automatically.

shell> mysql.server start
shell> mysql.server stop

See mysql.server in the `share/mysql’ directory or in the `support-files’ directory of the MySQL source tree.
The mysql.server script understands the following options: datadir, basedir, and pid-file.

If your system uses `/etc/rc.local’ to start external scripts, you should append the following to it:

/bin/sh -c ‘cd /usr/local/mysql ; ./bin/safe_mysqld –user=mysql &’

The mysql.server script understands the following options: datadir, basedir, and pid-file.

Post By Editor (2,827 Posts)

Website: →

Connect