bin/sh -c 'cd /usr/local/mysql ; ./bin/safe_mysqld --user=MySQL &'
你也可以在全局文件/etc/my.cnf中為MySQL.server添加選項。典型的
`/etc/my.cnf'如下:
[MySQLd]
datadir=/usr/local/MySQL/var
socket=/var/tmp/MySQL.sock
port=3306
user=MySQL
[MySQL.server]
basedir=/usr/local/MySQL
MySQL.server腳本可以識別下列選項: datadir, basedir和pidfile。
下列表格是啟動腳本從選項中讀取的選項組:
Script Option groups
mysqld MySQLd and server
mysql.server mysql.server, MySQLd, and server
safe_mysqld mysql.server, MySQLd, and server