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

In 23.02?

In 22.08?

In 6?

In 2.5?

In 2.4?

alter

23.08

23.02

22.08

6

2.5

2.4

alter filter

23.08

23.02

22.08

6

alter listener

23.08

23.02

22.08

6

alter logging

23.08

23.02

22.08

6

2.5

2.4

alter maxscale

23.08

23.02

22.08

6

2.5

2.4

alter monitor

23.08

23.02

22.08

6

2.5

2.4

alter server

23.08

23.02

22.08

6

2.5

2.4

alter service

23.08

23.02

22.08

6

2.5

2.4

alter service-filters

23.08

23.02

22.08

6

2.5

2.4

alter session

23.08

23.02

22.08

6

alter session-filters

23.08

23.02

22.08

6

alter user

23.08

23.02

22.08

6

2.5

2.4

api

23.08

23.02

22.08

6

2.5

2.4

api get

23.08

23.02

22.08

6

2.5

2.4

api patch

23.08

23.02

22.08

6

api post

23.08

23.02

22.08

6

call

23.08

23.02

22.08

6

2.5

2.4

call command

23.08

23.02

22.08

6

2.5

2.4

classify

23.08

23.02

22.08

6

2.5

2.4

clear

23.08

23.02

22.08

6

2.5

2.4

clear server

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

23.08

23.02

22.08

6

2.5

2.4

create filter

23.08

23.02

22.08

6

2.5

2.4

create listener

23.08

23.02

22.08

6

2.5

2.4

create monitor

23.08

23.02

22.08

6

2.5

2.4

create report

23.08

23.02

22.08

6

2.5

create server

23.08

23.02

22.08

6

2.5

2.4

create service

23.08

23.02

22.08

6

2.5

2.4

create user

23.08

23.02

22.08

6

2.5

2.4

debug

23.08

debug stacktrace

23.08

destroy

23.08

23.02

22.08

6

2.5

2.4

destroy filter

23.08

23.02

22.08

6

2.5

2.4

destroy listener

23.08

23.02

22.08

6

2.5

2.4

destroy monitor

23.08

23.02

22.08

6

2.5

2.4

destroy server

23.08

23.02

22.08

6

2.5

2.4

destroy service

23.08

23.02

22.08

6

2.5

2.4

destroy session

23.08

23.02

22.08

destroy user

23.08

23.02

22.08

6

2.5

2.4

disable

23.08

23.02

22.08

6

2.5

2.4

disable account

2.4

disable log-priority

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

23.08

23.02

22.08

6

2.5

2.4

enable account

2.4

enable log-priority

23.08

23.02

22.08

6

2.5

2.4

link

23.08

23.02

22.08

6

2.5

2.4

link monitor

23.08

23.02

22.08

6

2.5

2.4

link service

23.08

23.02

22.08

6

2.5

2.4

list

23.08

23.02

22.08

6

2.5

2.4

list commands

23.08

23.02

22.08

6

2.5

2.4

list filters

23.08

23.02

22.08

6

2.5

2.4

list listeners

23.08

23.02

22.08

6

2.5

2.4

list modules

23.08

23.02

22.08

6

2.5

2.4

list monitors

23.08

23.02

22.08

6

2.5

2.4

list queries

23.08

23.02

22.08

6

list servers

23.08

23.02

22.08

6

2.5

2.4

list services

23.08

23.02

22.08

6

2.5

2.4

list sessions

23.08

23.02

22.08

6

2.5

2.4

list threads

23.08

23.02

22.08

6

2.5

2.4

list users

23.08

23.02

22.08

6

2.5

2.4

reload

23.08

23.02

22.08

6

2.5

2.4

reload service

23.08

23.02

22.08

6

2.5

2.4

reload session

23.08

23.02

22.08

reload sessions

23.08

23.02

22.08

reload tls

23.08

23.02

22.08

rotate

23.08

23.02

22.08

6

2.5

2.4

rotate logs

23.08

23.02

22.08

6

2.5

2.4

set

23.08

23.02

22.08

6

2.5

2.4

set server

23.08

23.02

22.08

6

2.5

2.4

show

23.08

23.02

22.08

6

2.5

2.4

show commands

23.08

23.02

22.08

6

2.5

2.4

show dbusers

23.08

23.02

22.08

6

2.5

2.4

show filter

23.08

23.02

22.08

6

2.5

2.4

show filters

23.08

23.02

22.08

6

2.5

2.4

show listener

23.08

23.02

22.08

6

2.5

show listeners

23.08

23.02

22.08

6

2.5

show logging

23.08

23.02

22.08

6

2.5

2.4

show maxscale

23.08

23.02

22.08

6

2.5

2.4

show module

23.08

23.02

22.08

6

2.5

2.4

show modules

23.08

23.02

22.08

6

2.5

2.4

show monitor

23.08

23.02

22.08

6

2.5

2.4

show monitors

23.08

23.02

22.08

6

2.5

2.4

show qc_cache

23.08

23.02

22.08

6

2.5

2.4

show server

23.08

23.02

22.08

6

2.5

2.4

show servers

23.08

23.02

22.08

6

2.5

2.4

show service

23.08

23.02

22.08

6

2.5

2.4

show services

23.08

23.02

22.08

6

2.5

2.4

show session

23.08

23.02

22.08

6

2.5

2.4

show sessions

23.08

23.02

22.08

6

2.5

2.4

show thread

23.08

23.02

22.08

6

2.5

2.4

show threads

23.08

23.02

22.08

6

2.5

2.4

start

23.08

23.02

22.08

6

2.5

2.4

start listener

23.08

23.02

22.08

6

start monitor

23.08

23.02

22.08

6

2.5

2.4

start service

23.08

23.02

22.08

6

2.5

2.4

start services

23.08

23.02

22.08

6

2.5

2.4

stop

23.08

23.02

22.08

6

2.5

2.4

stop listener

23.08

23.02

22.08

6

stop monitor

23.08

23.02

22.08

6

2.5

2.4

stop service

23.08

23.02

22.08

6

2.5

2.4

stop services

23.08

23.02

22.08

6

2.5

2.4

unlink

23.08

23.02

22.08

6

2.5

2.4

unlink monitor

23.08

23.02

22.08

6

2.5

2.4

unlink service

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