All pages
Powered by GitBook
1 of 3

Operating MaxScale with MaxGUI

Operate MariaDB MaxScale using MaxGUI. This section provides a practical guide on configuring, monitoring, and managing your MaxScale instances through its intuitive graphical user interface.

Configuring MaxScale for MaxGUI

MaxGUI is a graphical utility that can perform administrative tasks using MaxScale's MaxScale's REST API. It is available starting in MaxScale 2.5. It supports many different operations.

MaxGUI is not available out-of-the box. MaxScale requires some configuration before MaxGUI can be used.

Enabling MaxGUI

  1. If you want to use MaxGUI remotely, configure the REST API for remote connections. Several global parameters must be configured in maxscale.cnf.

Parameter
Description

admin_host

• This parameter defines the network address that the REST API listens on.• The default value is 127.0.0.1.

admin_port

• This parameter defines the network port that the REST API listens on.• The default value is 8989.

For example:

[maxscale]
...
admin_host            = 0.0.0.0
admin_port            = 8443
  1. MaxGUI requires TLS, so you must enable TLS for MaxScale's REST API. Several global parameters must be configured in maxscale.cnf.

Parameter
Description

admin_ssl_key

• This parameter defines the private key used by the REST API.

admin_ssl_cert

• This parameter defines the certificate used by the REST API.

admin_ssl_ca_cert

• This parameter defines the CA certificate that signed the REST API's certificate.

For example:

[maxscale]
...
admin_ssl_key=/certs/server-key.pem
admin_ssl_cert=/certs/server-cert.pem
admin_ssl_ca_cert=/certs/ca-cert.pem
  1. Ensure that the admin_gui global parameter is enable. It is enabled by default, so it will only be disabled if it was previously disabled manually.

  2. Restart the MaxScale instance.

$ sudo systemctl restart maxscale
  1. Create a new admin REST API user with MaxCtrl:

$ maxctrl --secure \
   --user=admin \
   --password=mariadb \
   --hosts=192.0.2.100:8443
   --tls-key=/certs/client-key.pem \
   --tls-cert=/certs/client-cert.pem \
   --tls-ca-cert=/certs/ca.pem \
   create user "maxscale_rest_admin" "maxscale_rest_admin_password" --type=admin

Replace maxscale_rest_admin and maxscale_rest_admin_password with the desired user and password.

  1. Delete the default REST API named admin with MaxCtrl:

$ maxctrl --secure \
   --user=maxscale_rest_admin \
   --password=maxscale_rest_admin_password \
   --hosts=192.0.2.100:8443
   --tls-key=/certs/client-key.pem \
   --tls-cert=/certs/client-cert.pem \
   --tls-ca-cert=/certs/ca.pem \
   destroy user "admin"
  1. Visit MaxGUI in your web browser.

For example:

  • If you were accessing it from local host with the default port, then you would visit this address: 127.0.0.1:8989

  • If you were accessing it with the above example configuration, then you would visit this address: 192.168.2.100:8443

  1. Enter your user and password to login.

This page is: Copyright © 2025 MariaDB. All rights reserved.

Setting a Server to Maintenance Mode in MaxScale with MaxGUI

When using MaxScale, it is often necessary to temporarily remove a server from the load balancing pool without actually shutting down the server. This is usually needed to perform maintenance on the server, such as when upgrading the server's software or when performing schema upgrades.

MaxScale allows users to set servers to "maintenance mode", which prevents MaxScale from routing traffic to the server and prevents it from being elected as the new primary server during failover or switchover.

MaxGUI is a graphical utility that can perform administrative tasks using MaxScale's MaxScale's REST API. It is available starting in MaxScale 2.5. It can be used to set a server to maintenance mode.

Setting a Server to Maintenance Mode

  1. Configure MaxScale for MaxGUI

  2. Visit MaxGUI in your web browser. For example, if you are accessing it from local host with the default port, then visit this address: 127.0.0.1:8989

  3. Enter your user and password to login.

  4. On the dashboard, the "Servers" tab is shown by default.

  5. Click the server that you want to set to maintenance mode. This will bring up a page for the specific server.

  6. Click the gear icon at the top left corner of the page next to the server name. This will show some options in a popup.

  7. Click the pause icon. This will open a popup window.

  8. Click the "Maintain" button. If the specified server is a primary server, then MaxScale will allow open transactions to complete before closing any connections.

Forcing a Server to Maintenance Mode

  1. Configure MaxScale for MaxGUI

  2. Visit MaxGUI in your web browser. For example, if you are accessing it from local host with the default port, then visit this address: 127.0.0.1:8989

  3. Enter your user and password to login.

  4. On the dashboard, the "Servers" tab is shown by default.

  5. Click the server that you want to set to maintenance mode. This will bring up a page for the specific server.

  6. Click the gear icon at the top left corner of the page next to the server name. This will show some options in a popup.

  7. Click the pause icon. This will open a popup window.

  8. Check the "Force closing" checkbox.

  9. Click the "Maintain" button. When the "Force closing" checkbox is specified, MaxScale immediately close all connections, even if the server is a primary server that has open transactions.

This page is: Copyright © 2025 MariaDB. All rights reserved.