Updated documentation with new configuration file name.
This commit is contained in:
@ -22,7 +22,7 @@ or
|
||||
|
||||
$ /etc/init.d/maxscale start
|
||||
|
||||
It is also possible to start MaxScale by executing the maxscale command itself, in this case you must ensure that the environment is correctly setup or command line options are passed. The major elements to consider are the correct setting of the MAXSCALE\_HOME directory and to ensure that LD\_LIBRARY\_PATH. The LD\_LIBRARY\_PATH should include the lib directory that was installed as part of the MaxScale installation, the MAXSCALE\_HOME should point to /usr/local/mariadb-maxscale if a default installation has been created or to the directory this was relocated to. Running the executable $MAXSCALE\_HOME/bin/maxscale will result in MaxScale running as a daemon process, unattached to the terminal in which it was started and using configuration files that it finds in the $MAXSCALE\_HOME directory.
|
||||
It is also possible to start MaxScale by executing the maxscale command itself. Running the executable /usr/bin/maxscale will result in MaxScale running as a daemon process, unattached to the terminal in which it was started and using configuration files that it finds in the /etc directory.
|
||||
|
||||
Options may be passed to the MaxScale binary that alter this default behavior, this options are documented in the table below.
|
||||
|
||||
@ -56,9 +56,9 @@ or
|
||||
|
||||
$ /etc/init.d/maxscale stop
|
||||
|
||||
MaxScale will also stop gracefully if it received a hangup signal, to find the process id of the MaxScale server use the ps command or read the contents of the maxscale.pid file located in the same directory as the logs.
|
||||
MaxScale will also stop gracefully if it received a terminate signal, to find the process id of the MaxScale server use the ps command or read the contents of the maxscale.pid file located in the /var/run/maxscale directory.
|
||||
|
||||
$ kill -HUP `cat /log/maxscale.pid`
|
||||
$ kill `cat /var/run/maxscale/maxscale.pid`
|
||||
|
||||
In order to shutdown MaxScale using the maxadmin command you may either connect with maxadmin in interactive mode or pass the "shutdown maxscale" command you wish to execute as an argument to maxadmin.
|
||||
|
||||
@ -135,7 +135,7 @@ This may be integrated into the Linux logrotate mechanism by adding a configurat
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>/usr/local/mariadb-maxscale/log/*.log {
|
||||
<td>/var/log/maxscale/*.log {
|
||||
monthly
|
||||
rotate 5
|
||||
missingok
|
||||
@ -144,7 +144,7 @@ sharedscripts
|
||||
postrotate
|
||||
\# run if maxscale is running
|
||||
if test -n "`ps acx|grep maxscale`"; then
|
||||
/usr/local/mariadb-maxscale/bin/maxadmin -pmariadb flush logs
|
||||
/usr/bin/maxadmin -pmariadb flush logs
|
||||
fi
|
||||
endscript
|
||||
}</td>
|
||||
@ -156,14 +156,14 @@ One disadvantage with this is that the password used for the maxadmin command ha
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>/usr/local/mariadb-maxscale/log/*.log {
|
||||
<td>/var/log/maxscale/*.log {
|
||||
monthly
|
||||
rotate 5
|
||||
missingok
|
||||
nocompress
|
||||
sharedscripts
|
||||
postrotate
|
||||
kill -USR1 `cat /usr/local/mariadb-maxscale/log/maxscale.pid`
|
||||
kill -USR1 `cat /var/run/maxscale/maxscale.pid`
|
||||
endscript
|
||||
}</td>
|
||||
</tr>
|
||||
|
@ -60,7 +60,7 @@ If you wish to use two different usernames for the two different roles of monito
|
||||
|
||||
### Creating Your MaxScale Configuration
|
||||
|
||||
MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory /etc, if you have installed in the default location then this file is available in /usr/local/mariadb-maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration.
|
||||
MaxScale configuration is held in an ini file that is located in the file maxscale.cnf in the directory /etc, if you have installed in the default location then this file is available in /etc/maxscale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within the /usr/share/maxscale directory that may be use as a basis for your configuration.
|
||||
|
||||
A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients.
|
||||
|
||||
@ -89,7 +89,7 @@ In order to instruct the router to which servers it should route we must add rou
|
||||
|
||||
The final step in the service section is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored.
|
||||
|
||||
% maxkeys /usr/local/mariadb-maxscale/etc/.secrets
|
||||
% maxkeys /var/lib/maxscale/.secrets
|
||||
%
|
||||
|
||||
Once the keys have been created the maxpasswd command can be used to generate the encrypted password.
|
||||
@ -178,7 +178,7 @@ or
|
||||
|
||||
% service maxscale start
|
||||
|
||||
Check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
|
||||
Check the error log in /var/log/maxscale to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
|
||||
|
||||
% maxadmin -pmariadb list services
|
||||
|
||||
|
@ -62,7 +62,7 @@ If you wish to use two different usernames for the two different roles of monito
|
||||
|
||||
### Creating Your MaxScale Configuration
|
||||
|
||||
MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory /etc, if you have installed in the default location then this file is available in /usr/local/mariadb-maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration.
|
||||
MaxScale configuration is held in an ini file that is located in the file maxscale.cnf in the directory /etc, if you have installed in the default location then this file is available in /etc/maxscale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within the /usr/share/maxscale directory that may be use as a basis for your configuration.
|
||||
|
||||
A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients.
|
||||
|
||||
@ -83,7 +83,7 @@ The router for we need to use for this configuration is the readwritesplit modul
|
||||
|
||||
The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored.
|
||||
|
||||
% maxkeys /usr/local/mariadb-maxscale/etc/.secrets
|
||||
% maxkeys /var/lib/maxscale/.secrets
|
||||
%
|
||||
|
||||
Once the keys have been created the maxpasswd command can be used to generate the encrypted password.
|
||||
@ -183,7 +183,7 @@ or
|
||||
|
||||
% service maxscale start
|
||||
|
||||
Check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
|
||||
Check the error log in /var/log/maxscale to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
|
||||
|
||||
% maxadmin -pmariadb list services
|
||||
|
||||
|
@ -5,7 +5,7 @@ The plugin is capable of returning data in one of two ways, either as MySQL resu
|
||||
|
||||
# Configuration
|
||||
|
||||
The plugin is configured in the MaxScale.cnf plugin in much the same way as any other router service is configured, there needs to be a service section in the configuration file and also listeners defined for that service. The service does not however require any backend servers to be associated with it, or any monitors.
|
||||
The plugin is configured in the maxscale.cnf plugin in much the same way as any other router service is configured, there needs to be a service section in the configuration file and also listeners defined for that service. The service does not however require any backend servers to be associated with it, or any monitors.
|
||||
|
||||
The service entry needs to define the service name, the type as service and the router module to load.
|
||||
The specified user, with the password (plain or encrypted via maxpassword utility) is allowed to connect via MySQL protocol.
|
||||
|
@ -207,7 +207,7 @@ The SQL node is referenced here as [mysqld(API)], which reflects the fact that t
|
||||
|
||||
## Configuring MaxScale for connection load balancing of SQL nodes
|
||||
|
||||
Add these sections in MaxScale.cnf config file:
|
||||
Add these sections in maxscale.cnf config file:
|
||||
|
||||
[Cluster Service]
|
||||
type=service
|
||||
@ -249,7 +249,7 @@ Add these sections in MaxScale.cnf config file:
|
||||
|
||||
Assuming MaxScale is installed in server1, start it
|
||||
|
||||
[root@server1 ~]# cd /usr/local/mariadb-maxscale/bin
|
||||
[root@server1 ~]# cd /usr/bin
|
||||
|
||||
[root@server1 bin]# ./maxscale -c ../
|
||||
|
||||
|
@ -76,7 +76,7 @@ If you wish to use two different usernames for the two different roles of monito
|
||||
|
||||
## Creating Your MaxScale Configuration
|
||||
|
||||
MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory /etc. This is not created as part of the installation process and must be manually created. A template file does exist in the `/usr/share/maxscale` folder that can be use as a basis for your configuration.
|
||||
MaxScale configuration is held in an ini file that is located in the file maxscale.cnf in the directory /etc. This is not created as part of the installation process and must be manually created. A template file does exist in the `/usr/share/maxscale` folder that can be use as a basis for your configuration.
|
||||
|
||||
A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients.
|
||||
|
||||
@ -128,7 +128,7 @@ servers=dbserv1, dbserv2, dbserv3
|
||||
The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored.
|
||||
|
||||
```
|
||||
maxkeys /usr/local/mariadb-maxscale/etc/.secrets
|
||||
maxkeys /var/lib/maxscale/.secrets
|
||||
```
|
||||
|
||||
Once the keys have been created the maxpasswd command can be used to generate the encrypted password.
|
||||
|
@ -70,7 +70,7 @@ If you wish to use two different usernames for the two different roles of monito
|
||||
|
||||
## Creating Your MaxScale Configuration
|
||||
|
||||
MaxScale configuration is held in an ini file that is located in the file MaxScale.cnf in the directory /etc, if you have installed in the default location then this file is available in /usr/local/mariadb-maxscale/etc/MaxScale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within this directory that may be use as a basis for your configuration.
|
||||
MaxScale configuration is held in an ini file that is located in the file maxscale.cnf in the directory /etc, if you have installed in the default location then this file is available in /etc/maxscale.cnf. This is not created as part of the installation process and must be manually created. A template file does exist within the /usr/share/maxscale directory that may be use as a basis for your configuration.
|
||||
|
||||
A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients.
|
||||
|
||||
@ -96,7 +96,7 @@ servers=dbserv1, dbserv2, dbserv3
|
||||
|
||||
The final step in the service sections is to add the username and password that will be used to populate the user data from the database cluster. There are two options for representing the password, either plain text or encrypted passwords may be used. In order to use encrypted passwords a set of keys must be generated that will be used by the encryption and decryption process. To generate the keys use the maxkeys command and pass the name of the secrets file in which the keys are stored.
|
||||
|
||||
% maxkeys /usr/local/mariadb-maxscale/etc/.secrets
|
||||
% maxkeys /var/lib/maxscale/.secrets
|
||||
|
||||
%
|
||||
|
||||
@ -226,7 +226,7 @@ or
|
||||
|
||||
% service maxscale start
|
||||
|
||||
Check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
|
||||
Check the error log in /var/log/maxscale to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
|
||||
|
||||
% maxadmin -pmariadb list services
|
||||
|
||||
|
@ -44,7 +44,7 @@ In order to use these scripts on your Nagios Server, you need to copy them from
|
||||
|
||||
MaxScale must be configured with 'maxscaled' protocol for the administration interface:
|
||||
|
||||
Example of MaxScale.cnf file:
|
||||
Example of maxscale.cnf file:
|
||||
|
||||
[AdminInterface]
|
||||
type=service
|
||||
@ -73,9 +73,9 @@ and add (just after localhost.cfg or commnads.cfg)
|
||||
- modify server IP address in server1.cfg, pointing to MaxScale server
|
||||
- maxadmin executable must be in the nagios server
|
||||
- default MaxScale AdminInterface port is 6603
|
||||
- default maxadmin executable path is /usr/local/mariadb-maxscale/bin/maxadmin
|
||||
- default maxadmin executable path is /usr/bin/maxadmin
|
||||
It can be changed by -m option
|
||||
- maxadmin executable could be copied from an existing maxscale installation (default location is /usr/local/mariadb-maxscale/bin/maxadmin)
|
||||
- maxadmin executable could be copied from an existing maxscale installation (default location is /usr/bin/maxadmin)
|
||||
|
||||
This example shows configuration that needs to be done on Nagios server in order to communicate to MaxScale server that is running on host server1.
|
||||
In this example we are using the check_maxscale_resource as the check command
|
||||
|
@ -193,7 +193,7 @@ This generates RPM or DEB packages based on your system. These packages can then
|
||||
|
||||
## Step 5 - Configure new applications
|
||||
|
||||
The new filter needs to be configured in MaxScale.cnf.
|
||||
The new filter needs to be configured in maxscale.cnf.
|
||||
|
||||
[Test Service]
|
||||
type=service
|
||||
|
@ -28,7 +28,7 @@ Using MaxScale as a replication proxy is much the same as using MaxScale as a pr
|
||||
|
||||
## Service Configuration
|
||||
|
||||
As with any MaxScale configuration a good starting point is with the service definition with the MaxScale.cnf file. The service requires a name which is the section name in the ini file, a type parameter with a value of service and the name of the router plugin that should be loaded. In the case of replication proxies this router name is binlogrouter.
|
||||
As with any MaxScale configuration a good starting point is with the service definition with the maxscale.cnf file. The service requires a name which is the section name in the ini file, a type parameter with a value of service and the name of the router plugin that should be loaded. In the case of replication proxies this router name is binlogrouter.
|
||||
|
||||
|
||||
[Replication]
|
||||
|
@ -32,7 +32,7 @@ Upon successful completion of the installation command you will have MaxScale in
|
||||
|
||||
### Creating Your MaxScale Configuration
|
||||
|
||||
The first step in the creation of your MaxScale.cnf file is to define the global maxscale section. This section configures the number of threads MaxScale uses. A good rule of thumb is to use at most as may threads as you have CPUs. MaxScale uses few threads for internal operations so one or two threads less than the maximum should be enough.
|
||||
The first step in the creation of your maxscale.cnf file is to define the global maxscale section. This section configures the number of threads MaxScale uses. A good rule of thumb is to use at most as may threads as you have CPUs. MaxScale uses few threads for internal operations so one or two threads less than the maximum should be enough.
|
||||
|
||||
```
|
||||
[maxscale]
|
||||
@ -92,7 +92,7 @@ After this we have a fully working configuration and we can move on to starting
|
||||
|
||||
Upon completion of the configuration process MaxScale is ready to be started . This may either be done manually by running the maxscale command or via the service interface. The service scripts are located in the `/etc/init.d/` folder and are accessible through both the `service` and `systemctl` commands.
|
||||
|
||||
After starting MaxScale check the error log in /usr/local/mariadb-maxscale/log to see if any errors are detected in the configuration file. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
|
||||
After starting MaxScale check the error log in /var/log/maxscale to see if any errors are detected in the configuration file. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured.
|
||||
|
||||
MaxScale is now ready to start accepting client connections and routing them. Queries are routed to the right servers based on the database they target and switching between the shards is seamless since MaxScale keeps the session state intact between servers.
|
||||
|
||||
|
Reference in New Issue
Block a user