Running Multiple Mysql Instances On Windows - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

4. Modify the new option file so that any pathnames referring to the original data directory refer to the
new data directory. Also, modify any other options that must be unique per instance, such as the
TCP/IP port number and the log files. For a list of parameters that must be unique per instance, see
Section 5.3, "Running Multiple MySQL Instances on One
5. Start the new instance, telling it to use the new option file.

5.3.2. Running Multiple MySQL Instances on Windows

You can run multiple servers on Windows by starting them manually from the command line, each with
appropriate operating parameters, or by installing several servers as Windows services and running
them that way. General instructions for running MySQL from the command line or as a service are
given in
Section 2.10, "Installing MySQL on Microsoft
to start each server with different values for those options that must be unique per server, such as the
data directory. These options are listed in
Machine".
5.3.2.1. Starting Multiple MySQL Instances at the Windows Command Line
The procedure for starting a single MySQL server manually from the command line is described
in
Section 2.10.4.5, "Starting MySQL from the Windows Command
this way, you can specify the appropriate options on the command line or in an option file. It is more
convenient to place the options in an option file, but it is necessary to make sure that each server gets
its own set of options. To do this, create an option file for each server and tell the server the file name
with a
--defaults-file
Suppose that you want to run
mysqld-debug
1. Make sure that each data directory exists, including its own copy of the
contains the grant tables.
2. Create two option files. For example, create one file named
[mysqld]
datadir = C:/mydata1
port = 3307
Create a second file named
[mysqld]
datadir = C:/mydata2
port = 3308
3. Use the
C:\>
C:\mysql\bin\mysqld --defaults-file=C:\my-opts1.cnf
C:\>
C:\mysql\bin\mysqld-debug --defaults-file=C:\my-opts2.cnf
Each server starts in the foreground (no new prompt appears until the server exits later), so you will
need to issue those two commands in separate console windows.
To shut down the servers, connect to each using the appropriate port number:
C:\>
C:\mysql\bin\mysqladmin --port=3307 shutdown
C:\>
C:\mysql\bin\mysqladmin --port=3308 shutdown
Servers configured as just described permit clients to connect over TCP/IP. If your version of Windows
supports named pipes and you also want to permit named-pipe connections, use the
mysqld-debug
server that supports named-pipe connections must use a unique pipe name. For example, the
opts1.cnf

Running Multiple MySQL Instances on Windows

[240]
option when you run it.
mysqld
on port 3308 with a data directory of C:\mydata2. Use this procedure:
C:\my-opts2.cnf
[240]
--defaults-file
server and specify options that enable the named pipe and specify its name. Each
file might be written like this:
Machine".
Windows". The following sections describe how
Section 5.3, "Running Multiple MySQL Instances on One
on port 3307 with a data directory of C:\mydata1, and
that looks like this:
option to start each server with its own option file:
553
Line". To start multiple servers
database that
mysql
that looks like this:
C:\my-opts1.cnf
mysqld-nt
or
C:\my-

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents