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 24.02?

In 23.08?

In 23.02?

In 22.08?

In 6?

In 2.5?

In 2.4?

alter

24.02

23.08

23.02

22.08

6

2.5

2.4

alter filter

24.02

23.08

23.02

22.08

6

alter listener

24.02

23.08

23.02

22.08

6

alter logging

24.02

23.08

23.02

22.08

6

2.5

2.4

alter maxscale

24.02

23.08

23.02

22.08

6

2.5

2.4

alter monitor

24.02

23.08

23.02

22.08

6

2.5

2.4

alter server

24.02

23.08

23.02

22.08

6

2.5

2.4

alter service

24.02

23.08

23.02

22.08

6

2.5

2.4

alter service-filters

24.02

23.08

23.02

22.08

6

2.5

2.4

alter session

24.02

23.08

23.02

22.08

6

alter session-filters

24.02

23.08

23.02

22.08

6

alter user

24.02

23.08

23.02

22.08

6

2.5

2.4

api

24.02

23.08

23.02

22.08

6

2.5

2.4

api get

24.02

23.08

23.02

22.08

6

2.5

2.4

api patch

24.02

23.08

23.02

22.08

6

api post

24.02

23.08

23.02

22.08

6

call

24.02

23.08

23.02

22.08

6

2.5

2.4

call command

24.02

23.08

23.02

22.08

6

2.5

2.4

classify

24.02

23.08

23.02

22.08

6

2.5

2.4

clear

24.02

23.08

23.02

22.08

6

2.5

2.4

clear server

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

24.02

23.08

23.02

22.08

6

2.5

2.4

create filter

24.02

23.08

23.02

22.08

6

2.5

2.4

create listener

24.02

23.08

23.02

22.08

6

2.5

2.4

create monitor

24.02

23.08

23.02

22.08

6

2.5

2.4

create report

24.02

23.08

23.02

22.08

6

2.5

create server

24.02

23.08

23.02

22.08

6

2.5

2.4

create service

24.02

23.08

23.02

22.08

6

2.5

2.4

create user

24.02

23.08

23.02

22.08

6

2.5

2.4

debug

24.02

23.08

debug stacktrace

24.02

23.08

destroy

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy filter

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy listener

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy monitor

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy server

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy service

24.02

23.08

23.02

22.08

6

2.5

2.4

destroy session

24.02

23.08

23.02

22.08

destroy user

24.02

23.08

23.02

22.08

6

2.5

2.4

disable

24.02

23.08

23.02

22.08

6

2.5

2.4

disable account

2.4

disable log-priority

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

24.02

23.08

23.02

22.08

6

2.5

2.4

enable account

2.4

enable log-priority

24.02

23.08

23.02

22.08

6

2.5

2.4

link

24.02

23.08

23.02

22.08

6

2.5

2.4

link monitor

24.02

23.08

23.02

22.08

6

2.5

2.4

link service

24.02

23.08

23.02

22.08

6

2.5

2.4

list

24.02

23.08

23.02

22.08

6

2.5

2.4

list commands

24.02

23.08

23.02

22.08

6

2.5

2.4

list filters

24.02

23.08

23.02

22.08

6

2.5

2.4

list listeners

24.02

23.08

23.02

22.08

6

2.5

2.4

list modules

24.02

23.08

23.02

22.08

6

2.5

2.4

list monitors

24.02

23.08

23.02

22.08

6

2.5

2.4

list queries

24.02

23.08

23.02

22.08

6

list servers

24.02

23.08

23.02

22.08

6

2.5

2.4

list services

24.02

23.08

23.02

22.08

6

2.5

2.4

list sessions

24.02

23.08

23.02

22.08

6

2.5

2.4

list threads

24.02

23.08

23.02

22.08

6

2.5

2.4

list users

24.02

23.08

23.02

22.08

6

2.5

2.4

reload

24.02

23.08

23.02

22.08

6

2.5

2.4

reload service

24.02

23.08

23.02

22.08

6

2.5

2.4

reload session

24.02

23.08

23.02

22.08

reload sessions

24.02

23.08

23.02

22.08

reload tls

24.02

23.08

23.02

22.08

rotate

24.02

23.08

23.02

22.08

6

2.5

2.4

rotate logs

24.02

23.08

23.02

22.08

6

2.5

2.4

set

24.02

23.08

23.02

22.08

6

2.5

2.4

set server

24.02

23.08

23.02

22.08

6

2.5

2.4

show

24.02

23.08

23.02

22.08

6

2.5

2.4

show commands

24.02

23.08

23.02

22.08

6

2.5

2.4

show dbusers

24.02

23.08

23.02

22.08

6

2.5

2.4

show filter

24.02

23.08

23.02

22.08

6

2.5

2.4

show filters

24.02

23.08

23.02

22.08

6

2.5

2.4

show listener

24.02

23.08

23.02

22.08

6

2.5

show listeners

24.02

23.08

23.02

22.08

6

2.5

show logging

24.02

23.08

23.02

22.08

6

2.5

2.4

show maxscale

24.02

23.08

23.02

22.08

6

2.5

2.4

show module

24.02

23.08

23.02

22.08

6

2.5

2.4

show modules

24.02

23.08

23.02

22.08

6

2.5

2.4

show monitor

24.02

23.08

23.02

22.08

6

2.5

2.4

show monitors

24.02

23.08

23.02

22.08

6

2.5

2.4

show qc_cache

24.02

23.08

23.02

22.08

6

2.5

2.4

show server

24.02

23.08

23.02

22.08

6

2.5

2.4

show servers

24.02

23.08

23.02

22.08

6

2.5

2.4

show service

24.02

23.08

23.02

22.08

6

2.5

2.4

show services

24.02

23.08

23.02

22.08

6

2.5

2.4

show session

24.02

23.08

23.02

22.08

6

2.5

2.4

show sessions

24.02

23.08

23.02

22.08

6

2.5

2.4

show thread

24.02

23.08

23.02

22.08

6

2.5

2.4

show threads

24.02

23.08

23.02

22.08

6

2.5

2.4

start

24.02

23.08

23.02

22.08

6

2.5

2.4

start listener

24.02

23.08

23.02

22.08

6

start monitor

24.02

23.08

23.02

22.08

6

2.5

2.4

start service

24.02

23.08

23.02

22.08

6

2.5

2.4

start services

24.02

23.08

23.02

22.08

6

2.5

2.4

stop

24.02

23.08

23.02

22.08

6

2.5

2.4

stop listener

24.02

23.08

23.02

22.08

6

stop monitor

24.02

23.08

23.02

22.08

6

2.5

2.4

stop service

24.02

23.08

23.02

22.08

6

2.5

2.4

stop services

24.02

23.08

23.02

22.08

6

2.5

2.4

unlink

24.02

23.08

23.02

22.08

6

2.5

2.4

unlink monitor

24.02

23.08

23.02

22.08

6

2.5

2.4

unlink service

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