Running Multiple MySQL Instances on One Machine

Nasza ocena:

5
Wyświetleń: 707
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Running Multiple MySQL Instances on One Machine - strona 1 Running Multiple MySQL Instances on One Machine - strona 2

Fragment notatki:

Running Multiple MySQL Instances on One Machine
In some cases, you might want to run multiple instances of MySQL on a single machine. You might
want to test a new MySQL release while leaving an existing production setup undisturbed. Or you
might want to give different users access to different mysqld servers that they manage themselves.
(For example, you might be an Internet Service Provider that wants to provide independent MySQL
installations for different customers.)
It is possible to use a different MySQL server binary per instance, or use the same binary for multiple
instances, or any combination of the two approaches. For example, you might run a server from
MySQL 5.5 and one from MySQL 5.6, to see how different versions handle a given workload. Or
you might run multiple instances of the current production version, each managing a different set of
databases.
Whether or not you use distinct server binaries, each instance that you run must be configured with
unique values for several operating parameters. This eliminates the potential for conflict between
instances. Parameters can be set on the command line, in option files, or by setting environment
variables. See Section 4.2.3, “Specifying Program Options”. To see the values used by a given
instance, connect to it and execute a SHOW VARIABLES statement.
The primary resource managed by a MySQL instance is the data directory. Each instance should use
a different data directory, the location of which is specified using the --datadir=path [432] option.
For methods of configuring each instance with its own data directory, and warnings about the dangers
of failing to do so, see Section 5.6.1, “Setting Up Multiple Data Directories”.
In addition to using different data directories, several other options must have different values for each
server instance:
• --port=port_num [450]
--port [450] controls the port number for TCP/IP connections. Alternatively, if the host has
multiple network addresses, you can use --bind-address [429] to cause each server to listen to
a different address.
• --socket=path [456]
--socket [456] controls the Unix socket file path on Unix or the named pipe name on Windows.
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 [452]
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 sharedmemory
... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz