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 Enterprise 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 6?

In 2.5?

In 2.4?

In 2.3?

alter

6

2.5

2.4

2.3

alter filter

6

alter listener

6

alter logging

6

2.5

2.4

2.3

alter maxscale

6

2.5

2.4

2.3

alter monitor

6

2.5

2.4

2.3

alter server

6

2.5

2.4

2.3

alter service

6

2.5

2.4

2.3

alter service-filters

6

2.5

2.4

2.3

alter session

6

alter session-filters

6

alter user

6

2.5

2.4

2.3

api

6

2.5

2.4

2.3

api get

6

2.5

2.4

2.3

api patch

6

api post

6

call

6

2.5

2.4

2.3

call command

6

2.5

2.4

2.3

classify

6

2.5

2.4

2.3

clear

6

2.5

2.4

2.3

clear server

6

2.5

2.4

2.3

cluster

6

2.5

2.4

2.3

cluster diff

6

2.5

2.4

2.3

cluster sync

6

2.5

2.4

2.3

create

6

2.5

2.4

2.3

create filter

6

2.5

2.4

2.3

create listener

6

2.5

2.4

2.3

create monitor

6

2.5

2.4

2.3

create server

6

2.5

2.4

2.3

create service

6

2.5

2.4

2.3

create user

6

2.5

2.4

2.3

destroy

6

2.5

2.4

2.3

destroy filter

6

2.5

2.4

2.3

destroy listener

6

2.5

2.4

2.3

destroy monitor

6

2.5

2.4

2.3

destroy server

6

2.5

2.4

2.3

destroy service

6

2.5

2.4

2.3

destroy user

6

2.5

2.4

2.3

disable

6

2.5

2.4

2.3

disable account

2.4

2.3

disable log-priority

6

2.5

2.4

2.3

drain

6

2.5

2.4

2.3

drain server

6

2.5

2.4

2.3

enable

6

2.5

2.4

2.3

enable account

2.4

2.3

enable log-priority

6

2.5

2.4

2.3

link

6

2.5

2.4

2.3

link monitor

6

2.5

2.4

2.3

link service

6

2.5

2.4

2.3

list

6

2.5

2.4

2.3

list commands

6

2.5

2.4

2.3

list filters

6

2.5

2.4

2.3

list listeners

6

2.5

2.4

2.3

list modules

6

2.5

2.4

2.3

list monitors

6

2.5

2.4

2.3

list queries

6

list servers

6

2.5

2.4

2.3

list services

6

2.5

2.4

2.3

list sessions

6

2.5

2.4

2.3

list threads

6

2.5

2.4

2.3

list users

6

2.5

2.4

2.3

reload

6

2.5

2.4

reload service

6

2.5

2.4

rotate

6

2.5

2.4

2.3

rotate logs

6

2.5

2.4

2.3

set

6

2.5

2.4

2.3

set server

6

2.5

2.4

2.3

show

6

2.5

2.4

2.3

show commands

6

2.5

2.4

2.3

show dbusers

6

2.5

2.4

show filter

6

2.5

2.4

2.3

show filters

6

2.5

2.4

2.3

show listener

6

2.5

show listeners

6

2.5

show logging

6

2.5

2.4

2.3

show maxscale

6

2.5

2.4

2.3

show module

6

2.5

2.4

2.3

show modules

6

2.5

2.4

2.3

show monitor

6

2.5

2.4

2.3

show monitors

6

2.5

2.4

2.3

show qc_cache

6

2.5

2.4

show server

6

2.5

2.4

2.3

show servers

6

2.5

2.4

2.3

show service

6

2.5

2.4

2.3

show services

6

2.5

2.4

2.3

show session

6

2.5

2.4

2.3

show sessions

6

2.5

2.4

2.3

show thread

6

2.5

2.4

2.3

show threads

6

2.5

2.4

2.3

start

6

2.5

2.4

2.3

start listener

6

start monitor

6

2.5

2.4

2.3

start service

6

2.5

2.4

2.3

start services

6

2.5

2.4

2.3

stop

6

2.5

2.4

2.3

stop listener

6

stop monitor

6

2.5

2.4

2.3

stop service

6

2.5

2.4

2.3

stop services

6

2.5

2.4

2.3

unlink

6

2.5

2.4

2.3

unlink monitor

6

2.5

2.4

2.3

unlink service

6

2.5

2.4

2.3

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