mariadb-shell for MariaDB Shell
This page is part of MariaDB's MariaDB Documentation.
The parent of this page is: Command-Line Interfaces for MariaDB Shell
Topics on this page:
Overview
The mariadb-shell
utility, which is also called MariaDB Client, provides SQL shell access to MariaDB Shell. It supports both interactive and non-interactive use.
mariadb-shell Options for MariaDB Shell
Connection Options
Option | Argument | Description |
---|---|---|
CONNECT_ | Number of seconds to wait for the server response during the initial handshake before the connection times out. | |
[DATABASE] | The database to use after connecting. | |
DSN | A formatted URL string, i.e., | |
[HOST] | Hostname or IP address to use for the connection. | |
Suppress commands from being written to MariaDB binary logs. [DANGEROUS] | ||
[PASSWORD] | Password | |
PIDFILE | The full path to a local MariaDB pidfile (intended to be combined with | |
PORT | Port to connect to | |
PROFILE | Specifies a profile defined in | |
[PROTOCOL] | Protocol or driver to use. Possible values: mariadb, mysql, xpand, max, maxscale | |
PROTOCOL_ | Timeout in seconds for auto-detection of protocol or driver to use, default: 10 seconds | |
[SOCKET] | MariaDB socket file | |
SSL_ | TLS CA Certificate in PEM format | |
SSL_ | Certificate path | |
SSL_ | x509 Certificate in PEM format | |
SSL_ | TLS cipher | |
SSL_ | x509 Key in PEM format | |
SSL_ | Verify common name of server in its certificate against the hostname. Disabled by default. | |
[USER] | The username to use for the connection. | |
Instructs MariaDB Shell to wait for replicas to finish replicating binlogs before shutdowns. |
Included for Compatibility
Option | Argument | Description |
---|---|---|
Provided for compatibility with | ||
Provided for compatibility with | ||
Provided for compatibility with |
System Configuration Options
Option | Argument | Description |
---|---|---|
[COLORBLIND] | Turns the text color on ( | |
For various tools bundled into MariaDB Shell, runs them in a daemonized fashion. | ||
Enable debugging features | ||
EXEC | Executes a sql statement and returns a result. | |
Generates default cnf entries and appends to the found file or creates one in ~/.my.cnf | ||
{json, | Output stylings | |
PAGER | Sets the pager for the internal cli. | |
Sets a progress bar flag for all operations | ||
SSH_ | The ip address or url to use to connect to the remote host | |
SSH_ | The private key to use to connect to the remote host | |
[SSH_ | The private key passphrase to use | |
[SSH_ | ||
SSH_ | The port to use to connect to the remote host | |
SSH_ | The username to use to connect to the remote host | |
Stores current connection settings for selected profile (implies --profile,overwriting or creating a new one) | ||
Enables more verbose output. | ||
show program's version number and exit |
Integration With MariaDB Tools
The MariaDB Shell can also execute "MariaDB Tools" commands using the MariaDB Shell command-line. To do so, the first non-option argument will be one of the following tool names. The only options that can occur prior to the tool name are System Configuration Options (not Connection Options). The options that come after the tool name are interpreted by the tool itself, so see the linked tool page for its option handling.
The MariaDB Tools package must be installed for these to work. If an executable is not available, and error is displayed. For installation instructions, see the Install MariaDB Shell section.
First Argument | Description |
---|---|
align-output | executes mariadb-align-output via msh |
archiver | executes mariadb-archiver via msh |
backup-manager | executes mariadb-backup-manager via msh |
config-diff | executes mariadb-config-diff via msh |
database-summary | executes mariadb-database-summary via msh |
index-checker | executes mariadb-index-checker via msh |
iostat | executes mariadb-iostat via msh |
kill | executes mariadb-kill via msh |
parted | executes mariadb-parted via msh |
query-digest | executes mariadb-query-digest via msh |
schema-change | executes mariadb-schema-change via msh |
stat | executes mariadb-stat via msh |
stat-browser | executes mariadb-stat-browser via msh |
status-diff | executes mariadb-status-diff via msh |
summary | executes mariadb-summary via msh |
system-summary | executes mariadb-system-summary via msh |