/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