Rearrange tutorial sections
The sections are now ordered so that a later section always refers to an earlier section and not the other way around.
This commit is contained in:
@ -18,7 +18,7 @@ create the configuration file for MariaDB MaxScale.
|
|||||||
MariaDB MaxScale reads its configuration from `/etc/maxscale.cnf`. A template
|
MariaDB MaxScale reads its configuration from `/etc/maxscale.cnf`. A template
|
||||||
configuration is provided with the MaxScale installation.
|
configuration is provided with the MaxScale installation.
|
||||||
|
|
||||||
A global `[maxscale]` section is included within every MariaDB MaxScale
|
A global `[maxscale]` section is included in every MariaDB MaxScale
|
||||||
configuration file; this is used to set the values of various global parameters,
|
configuration file; this is used to set the values of various global parameters,
|
||||||
perhaps the most important of these is the number of threads that MariaDB
|
perhaps the most important of these is the number of threads that MariaDB
|
||||||
MaxScale will use to handle client requests. To automatically configure the
|
MaxScale will use to handle client requests. To automatically configure the
|
||||||
@ -29,6 +29,24 @@ thread count, use the `threads=auto` parameter.
|
|||||||
threads=auto
|
threads=auto
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Configuring Servers
|
||||||
|
|
||||||
|
Read the [Configuring Servers](Configuring-Servers.md) mini-tutorial to see how
|
||||||
|
the servers are configured.
|
||||||
|
|
||||||
|
## Configuring the Monitor
|
||||||
|
|
||||||
|
The next step is the configuration of the monitor. This depends on the type of
|
||||||
|
cluster you use with MaxScale.
|
||||||
|
|
||||||
|
For master-slave clusters read the
|
||||||
|
[Configuring MariaDB Monitor](Configuring-MariaDB-Monitor.md)
|
||||||
|
tutorial. If you are using a Galera cluster, read the
|
||||||
|
[Configuring Galera Monitor](Configuring-Galera-Monitor.md)
|
||||||
|
tutorial instead.
|
||||||
|
|
||||||
|
## Configuring the Service
|
||||||
|
|
||||||
We want two different ports to which the client application can connect; one
|
We want two different ports to which the client application can connect; one
|
||||||
that will be directed to a server where writes can be sent and another that will
|
that will be directed to a server where writes can be sent and another that will
|
||||||
load balance between all servers. To achieve this, we need to define two
|
load balance between all servers. To achieve this, we need to define two
|
||||||
@ -71,14 +89,25 @@ servers the service will use. For the write service we use the _master_ type and
|
|||||||
for the read service we use the _slave_ type.
|
for the read service we use the _slave_ type.
|
||||||
|
|
||||||
The final part of the service configuration is the `user` and `password`
|
The final part of the service configuration is the `user` and `password`
|
||||||
parameters that define the credentials that the service will use.
|
parameters that define the credentials that the service will use to populate the
|
||||||
|
user authentication data. To create this user, execute the following SQL commands.
|
||||||
|
|
||||||
|
```
|
||||||
|
CREATE USER 'maxscale'@'%' IDENTIFIED BY 'maxscale_pw';
|
||||||
|
GRANT SELECT ON mysql.user TO 'maxscale'@'%';
|
||||||
|
GRANT SELECT ON mysql.db TO 'maxscale'@'%';
|
||||||
|
GRANT SELECT ON mysql.tables_priv TO 'maxscale'@'%';
|
||||||
|
GRANT SHOW DATABASES ON *.* TO 'maxscale'@'%';
|
||||||
|
```
|
||||||
|
|
||||||
**Note:** For increased security [encrypt your passwords in the configuration file](Encrypting-Passwords.md).
|
**Note:** For increased security [encrypt your passwords in the configuration file](Encrypting-Passwords.md).
|
||||||
|
|
||||||
This completes the definitions required by the services, however listening ports
|
## Configuring the Listener
|
||||||
must be associated with the services in order to allow network connections. This
|
|
||||||
is done by creating a set of listener sections. Each service may have multiple
|
In order to allow network connections to the service, we must associate a network
|
||||||
listeners but for this tutorial we will only need one per service.
|
port with the service. This is done by creating a separate listener section in
|
||||||
|
the configuration file. A service may have multiple listeners but for this
|
||||||
|
tutorial we will only need one per service.
|
||||||
|
|
||||||
```
|
```
|
||||||
[Write-Listener]
|
[Write-Listener]
|
||||||
@ -107,22 +136,6 @@ to bind to a particular network interface when the host machine has multiple
|
|||||||
network interfaces. The default behavior is to listen on all network interfaces
|
network interfaces. The default behavior is to listen on all network interfaces
|
||||||
(the IPv6 address `::`).
|
(the IPv6 address `::`).
|
||||||
|
|
||||||
## Configuring Servers
|
|
||||||
|
|
||||||
Read the [Configuring Servers](Configuring-Servers.md) mini-tutorial to see how
|
|
||||||
the servers are configured.
|
|
||||||
|
|
||||||
## Configuring the Monitor and Servers
|
|
||||||
|
|
||||||
The next step is the configuration of the monitor. This depends on the type of
|
|
||||||
cluster you use with MaxScale.
|
|
||||||
|
|
||||||
For master-slave clusters read the
|
|
||||||
[Configuring MariaDB Monitor](Configuring-MariaDB-Monitor.md)
|
|
||||||
tutorial. If you are using a Galera cluster, read the
|
|
||||||
[Configuring Galera Monitor](Configuring-Galera-Monitor.md)
|
|
||||||
tutorial instead.
|
|
||||||
|
|
||||||
## Configuring the Administrative Interface
|
## Configuring the Administrative Interface
|
||||||
|
|
||||||
The MaxAdmin configuration is described in the
|
The MaxAdmin configuration is described in the
|
||||||
|
@ -19,7 +19,7 @@ create the configuration file for MariaDB MaxScale.
|
|||||||
MariaDB MaxScale reads its configuration from `/etc/maxscale.cnf`. A template
|
MariaDB MaxScale reads its configuration from `/etc/maxscale.cnf`. A template
|
||||||
configuration is provided with the MaxScale installation.
|
configuration is provided with the MaxScale installation.
|
||||||
|
|
||||||
A global `[maxscale]` section is included within every MariaDB MaxScale
|
A global `[maxscale]` section is included in every MariaDB MaxScale
|
||||||
configuration file; this is used to set the values of various global parameters,
|
configuration file; this is used to set the values of various global parameters,
|
||||||
perhaps the most important of these is the number of threads that MariaDB
|
perhaps the most important of these is the number of threads that MariaDB
|
||||||
MaxScale will use to handle client requests. To automatically configure the
|
MaxScale will use to handle client requests. To automatically configure the
|
||||||
@ -30,10 +30,29 @@ thread count, use the `threads=auto` parameter.
|
|||||||
threads=auto
|
threads=auto
|
||||||
```
|
```
|
||||||
|
|
||||||
The first step is to create a Read/Write Splitter service. Create the following
|
## Configuring Servers
|
||||||
section in your configuration file. The section name is the names of the service
|
|
||||||
and should be meaningful to the administrator. For this tutorial, we use the
|
Read the [Configuring Servers](Configuring-Servers.md) mini-tutorial to see how
|
||||||
`Splitter-Service` name for our service.
|
the servers are configured.
|
||||||
|
|
||||||
|
## Configuring the Monitor
|
||||||
|
|
||||||
|
The next step is the configuration of the monitor. This depends on the type of
|
||||||
|
cluster you use with MaxScale.
|
||||||
|
|
||||||
|
For master-slave clusters read the
|
||||||
|
[Configuring MariaDB Monitor](Configuring-MariaDB-Monitor.md)
|
||||||
|
tutorial. If you are using a Galera cluster, read the
|
||||||
|
[Configuring Galera Monitor](Configuring-Galera-Monitor.md)
|
||||||
|
tutorial instead.
|
||||||
|
|
||||||
|
## Configuring the Service
|
||||||
|
|
||||||
|
After configuring the servers and the monitor, we create a Read/Write Splitter
|
||||||
|
service configuration. Create the following section in your configuration
|
||||||
|
file. The section name is the names of the service and should be meaningful to
|
||||||
|
the administrator. For this tutorial, we use the `Splitter-Service` name for our
|
||||||
|
service.
|
||||||
|
|
||||||
```
|
```
|
||||||
[Splitter-Service]
|
[Splitter-Service]
|
||||||
@ -52,14 +71,25 @@ in the configuration file (to be defined later) and not the physical hostnames
|
|||||||
or addresses of the servers.
|
or addresses of the servers.
|
||||||
|
|
||||||
The final part of the service configuration is the `user` and `password`
|
The final part of the service configuration is the `user` and `password`
|
||||||
parameters that define the credentials that the service will use.
|
parameters that define the credentials that the service will use to populate the
|
||||||
|
user authentication data. To create this user, execute the following SQL commands.
|
||||||
|
|
||||||
|
```
|
||||||
|
CREATE USER 'maxscale'@'%' IDENTIFIED BY 'maxscale_pw';
|
||||||
|
GRANT SELECT ON mysql.user TO 'maxscale'@'%';
|
||||||
|
GRANT SELECT ON mysql.db TO 'maxscale'@'%';
|
||||||
|
GRANT SELECT ON mysql.tables_priv TO 'maxscale'@'%';
|
||||||
|
GRANT SHOW DATABASES ON *.* TO 'maxscale'@'%';
|
||||||
|
```
|
||||||
|
|
||||||
**Note:** For increased security [encrypt your passwords in the configuration file](Encrypting-Passwords.md).
|
**Note:** For increased security [encrypt your passwords in the configuration file](Encrypting-Passwords.md).
|
||||||
|
|
||||||
This completes the service definition, however listening ports must be
|
## Configuring the Listener
|
||||||
associated with the service in order to allow network connections. This is done
|
|
||||||
by creating a separate listener section in the configuration file. A service may
|
In order to allow network connections to the services, we must associate network
|
||||||
have multiple listeners but for this tutorial we will only need one.
|
ports with the services. This is done by creating a separate listener section in
|
||||||
|
the configuration file. A service may have multiple listeners but for this
|
||||||
|
tutorial we will only need one.
|
||||||
|
|
||||||
```
|
```
|
||||||
[Splitter-Listener]
|
[Splitter-Listener]
|
||||||
@ -81,22 +111,6 @@ to bind to a particular network interface when the host machine has multiple
|
|||||||
network interfaces. The default behavior is to listen on all network interfaces
|
network interfaces. The default behavior is to listen on all network interfaces
|
||||||
(the IPv6 address `::`).
|
(the IPv6 address `::`).
|
||||||
|
|
||||||
## Configuring Servers
|
|
||||||
|
|
||||||
Read the [Configuring Servers](Configuring-Servers.md) mini-tutorial to see how
|
|
||||||
the servers are configured.
|
|
||||||
|
|
||||||
## Configuring the Monitor
|
|
||||||
|
|
||||||
The next step is the configuration of the monitor. This depends on the type of
|
|
||||||
cluster you use with MaxScale.
|
|
||||||
|
|
||||||
For master-slave clusters read the
|
|
||||||
[Configuring MariaDB Monitor](Configuring-MariaDB-Monitor.md)
|
|
||||||
tutorial. If you are using a Galera cluster, read the
|
|
||||||
[Configuring Galera Monitor](Configuring-Galera-Monitor.md)
|
|
||||||
tutorial instead.
|
|
||||||
|
|
||||||
## Configuring the Administrative Interface
|
## Configuring the Administrative Interface
|
||||||
|
|
||||||
The MaxAdmin configuration is described in the
|
The MaxAdmin configuration is described in the
|
||||||
|
Reference in New Issue
Block a user