MaxCtrl Commands for MariaDB MaxScale

Overview

MariaDB MaxScale ships with a command-line utility and administrative console called MaxCtrl (maxctrl) to configure and manage MariaDB database product deployments through the MaxScale REST API. MaxCtrl supports many different commands.

Reference material is available for MariaDB MaxScale.

Usage

MaxCtrl commands can be run as command-line arguments:

$ maxctrl show services

Alternatively, if you need to execute several commands, you can open the administrative console by running MaxCtrl without arguments:

$ maxctrl

If authentication is enabled for MaxScale's REST API, the user name and password can be provided via the --user and --password options:

$ maxctrl --user='maxscale' \
   --password='secure-password' \
   show services

The default user name is admin, and the default password is mariadb.

MaxCtrl Commands by MariaDB MaxScale Version

Choose a version of MariaDB MaxScale to see the MaxCtrl Commands supported by that version:

Support Matrix by Version

A summary of MaxCtrl Commands across MariaDB MaxScale versions:

Command

In 25.01?

In 24.08?

In 24.02?

In 23.08?

In 23.02?

In 22.08?

In 6?

In 2.5?

In 2.4?

alter

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

alter filter

25.01

24.08

24.02

23.08

23.02

22.08

6

alter listener

25.01

24.08

24.02

23.08

23.02

22.08

6

alter logging

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

alter maxscale

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

alter monitor

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

alter server

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

alter service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

alter service-filters

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

alter session

25.01

24.08

24.02

23.08

23.02

22.08

6

alter session-filters

25.01

24.08

24.02

23.08

23.02

22.08

6

alter user

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

api

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

api get

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

api patch

25.01

24.08

24.02

23.08

23.02

22.08

6

api post

25.01

24.08

24.02

23.08

23.02

22.08

6

call

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

call command

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

classify

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

clear

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

clear server

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

cluster

22.08

6

2.5

2.4

cluster diff

22.08

6

2.5

2.4

cluster sync

22.08

6

2.5

2.4

create

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

create filter

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

create listener

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

create monitor

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

create report

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

create server

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

create service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

create user

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

debug

25.01

24.08

24.02

23.08

debug stacktrace

25.01

24.08

24.02

23.08

destroy

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy filter

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy listener

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy monitor

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy server

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy session

25.01

24.08

24.02

23.08

23.02

22.08

destroy user

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

disable

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

disable account

2.4

disable log-priority

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

drain

22.08

6

2.5

2.4

drain server

22.08

6

2.5

2.4

enable

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

enable account

2.4

enable log-priority

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

link

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

link monitor

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

link service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list commands

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list filters

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list listeners

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list modules

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list monitors

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list queries

25.01

24.08

24.02

23.08

23.02

22.08

6

list servers

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list services

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list sessions

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list threads

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

list users

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

reload

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

reload service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

reload session

25.01

24.08

24.02

23.08

23.02

22.08

reload sessions

25.01

24.08

24.02

23.08

23.02

22.08

reload tls

25.01

24.08

24.02

23.08

23.02

22.08

rotate

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

rotate logs

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

set

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

set server

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show commands

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show dbusers

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show filter

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show filters

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show listener

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

show listeners

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

show logging

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show maxscale

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show module

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show modules

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show monitor

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show monitors

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show qc_cache

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show server

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show servers

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show services

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show session

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show sessions

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show thread

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

show threads

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

start

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

start listener

25.01

24.08

24.02

23.08

23.02

22.08

6

start monitor

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

start service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

start services

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

stop

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

stop listener

25.01

24.08

24.02

23.08

23.02

22.08

6

stop monitor

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

stop service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

stop services

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

unlink

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

unlink monitor

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

unlink service

25.01

24.08

24.02

23.08

23.02

22.08

6

2.5

2.4

Configuration File

MaxCtrl reads command-line options from the ~/.maxctrl.cnf configuration file.

The configuration file can be used to store common options, such as the user name and password:

[maxctrl]
user = maxscale
password = secure-password

MaxCtrl will refuse to use the ~/.maxctrl.cnf configuration file if it can be accessed by anyone other than the owner. Ensure that only the owner can access the file using the following command:

$ chown 0600 ~/.maxctrl.cnf

MaxCtrl can use a different configuration file by specifying the -c or --config option:

$ maxctrl --config=/maxscale/maxctrl.cnf \
   show services