Oracle 5.0 Reference Manual page 571

Table of Contents

Advertisement

Running Multiple MySQL Instances on One Machine
For methods of configuring each instance with its own data directory, and warnings about the dangers
of failing to do so, see
In addition to using different data directories, several other options must have different values for each
server instance:
--port=port_num
[417]
controls the port number for TCP/IP connections. Alternatively, if the host has
--port
multiple network addresses, you can use
a different address.
[422]
--socket=path
[422]
controls the Unix socket file path on Unix or the named pipe name on Windows.
--socket
On Windows, it is necessary to specify distinct pipe names only for those servers configured to
permit named-pipe connections.
--shared-memory-base-name=name
This option is used only on Windows. It designates the shared-memory name used by a Windows
server to permit clients to connect using shared memory. It is necessary to specify distinct shared-
memory names only for those servers configured to permit shared-memory connections.
--pid-file=file_name
This option indicates the path name of the file in which the server writes its process ID.
If you use the following log file options, their values must differ for each server:
--log[=file_name]
--log-bin[=file_name]
--log-error[=file_name]
--bdb-logdir=file_name
For further discussion of log file options, see
To achieve better performance, you can specify the following options differently for each server, to
spread the load between several physical disks:
[424]
--tmpdir=path
--bdb-tmpdir=path
Having different temporary directories also makes it easier to determine which MySQL server created
any given temporary file.
If you have multiple MySQL installations in different locations, you can specify the base directory for
each installation with the
use a different data directory, log files, and PID file because the default for each of those parameters
is relative to the base directory. In that case, the only other options you need to specify are the
[422]
and
socket
--port
using
file binary distributions. These install in different locations, so you can start the server for
tar
each installation using the command
determines the proper
mysqld_safe
specify only the
--socket
As discussed in the following sections, it is possible to start additional servers by specifying appropriate
command options or by setting environment variables. However, if you need to run multiple servers
Section 5.3.1, "Setting Up Multiple Data
[417]
--bind-address
[420]
[417]
[411]
[1467]
[411]
[1309]
Section 5.2, "MySQL Server
[1310]
[401]
--basedir=path
[417]
options. Suppose that you install different versions of MySQL
bin/mysqld_safe
--basedir
[248]
and
--port
551
Directories".
[401]
option. This causes each instance to automatically
under its corresponding base directory.
[401]
option to pass to mysqld, and you need
[248]
options to mysqld_safe.
to cause each server to listen to
Logs".
--

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents