mysql.server — MySQL Server Startup Script •As an alternative to the preceding setup, some operating systems also use  /etc/rc.local  or  /etc/ init.d/boot.local  to start additional services on startup. To start up MySQL using this method, append a command like the one following to the appropriate startup file: •For other systems, consult your operating system documentation to see how to install startup scripts. /bin/sh -c ’cd /usr/local/mysql; ./bin/mysqld_safe --user=mysql &’ mysql.server  reads options from the  [mysql.server]  and  [mysqld]  sections of option files. For backward compatibility, it also reads  [mysql_server]  sections, but to be current you should rename such sections to  [mysql.server] . You can add options for  mysql.server  in a global  /etc/my.cnf  file. A typical  my.cnf  file might look like this: The  mysql.server  script supports the options shown in the following table. If specified, they  must  be placed in an option file, not on the command line.  mysql.server  supports only  start  and  stop  as command-line arguments. The path to the MySQL installation directory. The path to the MySQL data directory. The path name of the file in which the server should write its process ID. The server creates the file in the data directory unless an absolute path name is given to specify a different directory. If this option is not given,  mysql.server  uses a default value of  host_name .pid . The PID file value passed to  mysqld_safe  overrides any value specified in the  [mysqld_safe]  option file group. Because  mysql.server  reads the  [mysqld]  option file group but not the  [mysqld_safe]  group, you can ensure that  mysqld_safe  gets the same value when invoked from  mysql.server  as when invoked manually by putting the same  pid-file  setting in both the  [mysqld_safe]  and  [mysqld] groups. [mysqld] datadir=/usr/local/mysql/var socket=/var/tmp/mysql.sock port=3306 user=mysql [mysql.server] basedir=/usr/local/mysql Option Name Description Type basedir Path to MySQL installation directory Directory name datadir Path to MySQL data directory Directory name pid-file File in which server should write its process ID File name service-startup-timeout How long to wait for server startup Integer Table 4.7 mysql.server Option-File Options • basedir= dir_name • datadir= dir_name • pid-file= file_name 390