Oracle 5.0 Reference Manual page 155

Table of Contents

Advertisement

To install
mysql.server
and then make it executable. Do this by changing location into the appropriate directory where
is located and executing these commands:
mysql.server
shell>
cp mysql.server /etc/init.d/mysql
shell>
chmod +x /etc/init.d/mysql
Note
Older Red Hat systems use the
etc/init.d. Adjust the preceding commands accordingly. Alternatively, first
create
shell>
cd /etc
shell>
ln -s rc.d/init.d .
After installing the script, the commands needed to activate it to run at system startup depend on your
operating system. On Linux, you can use chkconfig:
shell>
chkconfig --add mysql
On some Linux systems, the following command also seems to be necessary to fully enable the
script:
shell>
chkconfig --level 345 mysql on
On FreeBSD, startup scripts generally should go in /usr/local/etc/rc.d/. The
page states that scripts in this directory are executed only if their basename matches the
file name pattern. Any other files or directories present within the directory are silently ignored. In
other words, on FreeBSD, you should install the
to enable automatic startup.
mysql.server.sh
As an alternative to the preceding setup, some operating systems also use
init.d/boot.local
you could append a command like the one following to the appropriate startup file:
/bin/sh -c 'cd /usr/local/mysql; ./bin/mysqld_safe --user=mysql &'
For other systems, consult your operating system documentation to see how to install startup scripts.
You can add options for
might look like this:
[mysqld]
datadir=/usr/local/mysql/var
socket=/var/tmp/mysql.sock
port=3306
user=mysql
[mysql.server]
basedir=/usr/local/mysql
The
script supports the following options: basedir, datadir, and pid-file. If
mysql.server
specified, they must be placed in an option file, not on the command line.
only
and
as command-line arguments.
start
stop
The following table shows which option groups the server and each startup script read from option files.
Table 2.8. MySQL Startup scripts and supported server option groups
Script
Option Groups
mysqld
[mysqld], [server],
mysqld_safe
[mysqld], [server],
Unix Postinstallation Procedures
manually, copy it to the
as a symbolic link that points to /etc/rc.d/init.d:
/etc/init.d
to start additional services on startup. To start up MySQL using this method,
in a global
mysql.server
[mysqld-major_version]
[mysqld_safe]
135
directory with the name mysql,
/etc/init.d
/etc/rc.d/init.d
script as
mysql.server
file. A typical
/etc/my.cnf
directory rather than
/
mysql
manual
rc(8)
shell
*.sh
/usr/local/etc/rc.d/
or
/etc/rc.local
/etc/
/etc/my.cnf
supports
mysql.server
file

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents