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:
Markus Mäkelä 2018-03-13 21:55:21 +02:00
parent bbe57a58cb
commit f5e2870c83
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 75 additions and 48 deletions

View File

@ -18,7 +18,7 @@ create the configuration file for MariaDB MaxScale.
MariaDB MaxScale reads its configuration from `/etc/maxscale.cnf`. A template
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,
perhaps the most important of these is the number of threads that MariaDB
MaxScale will use to handle client requests. To automatically configure the
@ -29,6 +29,24 @@ thread count, use the `threads=auto` parameter.
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
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
@ -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.
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).
This completes the definitions required by the services, however listening ports
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
listeners but for this tutorial we will only need one per service.
## Configuring the Listener
In order to allow network connections to the service, we must associate a network
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]
@ -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
(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
The MaxAdmin configuration is described in the

View File

@ -19,7 +19,7 @@ create the configuration file for MariaDB MaxScale.
MariaDB MaxScale reads its configuration from `/etc/maxscale.cnf`. A template
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,
perhaps the most important of these is the number of threads that MariaDB
MaxScale will use to handle client requests. To automatically configure the
@ -30,10 +30,29 @@ thread count, use the `threads=auto` parameter.
threads=auto
```
The first step is to create a Read/Write Splitter service. 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.
## 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
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]
@ -52,14 +71,25 @@ in the configuration file (to be defined later) and not the physical hostnames
or addresses of the servers.
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).
This completes the service definition, however listening ports must be
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
have multiple listeners but for this tutorial we will only need one.
## Configuring the Listener
In order to allow network connections to the services, we must associate network
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]
@ -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
(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
The MaxAdmin configuration is described in the