MaxCtrl Commands for MariaDB MaxScale 24.02


MariaDB MaxScale 24.02 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 24.02.


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.

MariaDB MaxScale 24.02 MaxCtrl Commands

The following MaxCtrl Commands are supported by MariaDB MaxScale 24.02:




alter filter

alter listener

alter logging

Modifies global logging configuration

alter maxscale

Modifies global MaxScale configuration

alter monitor

Modifies parameters for a monitor

alter server

Modifes parameters for a server module

alter service

Modifies configuration for a service

alter service-filters

Modifies configuration for a filter service

alter session

alter session-filters

alter user

Changes password for a network user


api get

Retrieves raw JSON from MaxScale API

api patch

api post


call command

Executes a command on the given module


Classifies the given statement


clear server

Clears the server module state


create filter

Creates a new filter service

create listener

Creates a new listener service

create monitor

Creates a new monitor

create report

Generates a report describing the state of all MaxScale objects

create server

Creates a new server module

create service

Creates a new service

create user

Creates a new network user


debug stacktrace


destroy filter

Removes a filter service

destroy listener

Removes a listener service

destroy monitor

Removes a monitor

destroy server

Removes a server module

destroy service

Removes a service

destroy session

destroy user

Removes a network user


disable log-priority

Disables logging messages of the given priority level


enable log-priority

Enables logging messages of the given priority level


link monitor

Links server modules to the given monitor

link service

Links server modules to the given service


list commands

Lists commands for configured modules

list filters

Lists configured filter services

list listeners

Lists listeners for the given service

list modules

Lists modules currently loaded

list monitors

Lists monitors

list queries

list servers

Lists configured server modules

list services

Lists configured services

list sessions

Lists current sessions

list threads

Lists threads in use

list users

Lists network users


reload service

reload session

reload sessions

reload tls


rotate logs

Rotates logs (closes and reopens log files)


set server

Configures the state of the given server module


show commands

Displays commands available to the given module

show dbusers

show filter

Displays the configuration of the given filter service

show filters

Displays the configuration of all filter services

show listener

show listeners

show logging

Displays the logging configuration

show maxscale

Displays the global MariaDB MaxScale configuration

show module

Displays the configuration of the given module

show modules

Displays the configuration of all modules

show monitor

Displays the configuration of the given monitor

show monitors

Displays the configuration of all monitors

show qc_cache

show server

Displays the configuration of the given server module

show servers

Displays the configuration of all server modules

show service

Displays the configuration of the given service

show services

Displays the configuration of all services

show session

Displays information on the given session

show sessions

Displays information on all sessions

show thread

Displays information on the given thread

show threads

Displays information on all threads


start listener

start monitor

Starts the given monitor

start service

Starts the given service

start services

Starts all services


stop listener

stop monitor

Stops the given monitor

stop service

Stops the given service

stop services

Stops all services


unlink monitor

Removes link from server modules to the given monitor

unlink service

Removes link from server modules to the given service

To see MaxCtrl Commands supported in other versions, see "MaxCtrl Commands by MariaDB MaxScale Version".

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:

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