Unix Postinstallation Procedures
135
To install
mysql.server
manually, copy it to the
/etc/init.d
directory with the name
mysql
,
and then make it executable. Do this by changing location into the appropriate directory where
mysql.server
is located and executing these commands:
shell>
cp mysql.server /etc/init.d/mysql
shell>
chmod +x /etc/init.d/mysql
Note
Older Red Hat systems use the
/etc/rc.d/init.d
directory rather than
/
etc/init.d
. Adjust the preceding commands accordingly. Alternatively, first
create
/etc/init.d
as a symbolic link that points to
/etc/rc.d/init.d
:
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
mysql
script:
shell>
chkconfig --level 345 mysql on
On FreeBSD, startup scripts generally should go in
/usr/local/etc/rc.d/
. The
rc(8)
manual
page states that scripts in this directory are executed only if their basename matches the
*.sh
shell
file name pattern. Any other files or directories present within the directory are silently ignored. In
other words, on FreeBSD, you should install the
mysql.server
script as
/usr/local/etc/rc.d/
mysql.server.sh
to enable automatic startup.
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,
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
mysql.server
in a global
/etc/my.cnf
file. A typical
/etc/my.cnf
file
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
mysql.server
script supports the following options:
basedir
,
datadir
, and
pid-file
. 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 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-major_version]
mysqld_safe
[mysqld]
,
[server]
,
[mysqld_safe]
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...