To stop the services, use the services manager, or use
names:
C:\>
NET STOP mysqld1
C:\>
NET STOP mysqld2
• Approach 2: Specify options for each server in separate files and use
when you install the services to tell each server what file to use. In this case, each file should list
options using a
With this approach, to specify options for the 4.1.24 mysqld-nt, create a file
that looks like this:
[mysqld]
basedir = C:/mysql-4.1.24
port = 3307
enable-named-pipe
socket = mypipe1
For the 5.0.96 mysqld-nt, create a file
[mysqld]
basedir = C:/mysql-5.0.96
port = 3308
enable-named-pipe
socket = mypipe2
Install the services as follows (enter each command on a single line):
C:\>
C:\mysql-4.1.24\bin\mysqld-nt --install mysqld1
C:\>
C:\mysql-5.0.96\bin\mysqld-nt --install mysqld2
When you install a MySQL server as a service and use a
service name must precede the option.
After installing the services, start and stop them the same way as in the preceding example.
To remove multiple services, use
following the
5.3.3. Running Multiple MySQL Instances on Unix
One way is to run multiple MySQL instances on Unix is to compile different servers with different
default TCP/IP ports and Unix socket files so that each one listens on different network interfaces.
Compiling in different base directories for each installation also results automatically in a separate,
compiled-in data directory, log file, and PID file location for each server.
Assume that an existing 4.1 server is configured for the default TCP/IP port number (3306) and
Unix socket file (/tmp/mysql.sock). To configure a new 5.0.96 server to have different operating
parameters, use a
shell>
./configure --with-tcp-port=port_number \
Here,
port_number
socket file path name, and the
from the one under which the existing MySQL installation is located.
If you have a MySQL server listening on a given port number, you can use the following command to
find out what operating parameters it is using for several important configurable variables, including the
base directory and Unix socket file name:
Running Multiple MySQL Instances on Unix
group.
[mysqld]
--defaults-file=C:\my-opts1.cnf
--defaults-file=C:\my-opts2.cnf
mysqld --remove
[418]
option. If the service name is the default (MySQL), you can omit it.
--remove
command something like this:
configure
--with-unix-socket-path=file_name \
--prefix=/usr/local/mysql-5.0.96
and
file_name
--prefix
NET STOP
C:\my-opts2.cnf
--defaults-file
for each one, specifying a service name
must be different from the default TCP/IP port number and Unix
[121]
value should specify an installation directory different
555
with the appropriate service
--defaults-file
C:\my-opts1.cnf
that looks like this:
[240]
option, the
[240]
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?