Output Formats for MariaDB Shell
This page is part of MariaDB's MariaDB Documentation.
The parent of this page is: MariaDB Shell
Topics on this page:
Overview
MariaDB Shell supports multiple output formats.
Compatibility
MariaDB Shell (mariadb-shell
) has been tested by MariaDB to properly connect and execute commands with:
MariaDB Enterprise ColumnStore 6
MariaDB Enterprise ColumnStore 22.08
MariaDB Enterprise ColumnStore 23.02
MariaDB Enterprise Server 10.4
MariaDB Enterprise Server 10.5
MariaDB Enterprise Server 10.6
MariaDB MaxScale 2.4
MariaDB MaxScale 2.5
MariaDB MaxScale 6
MariaDB MaxScale 22.08
MariaDB MaxScale 23.02
MariaDB Xpand 5.3
MariaDB Xpand 6.0
MariaDB Xpand 6.1
Supported Operating Systems
Apple macOS (x86_
64 / M1) CentOS 7 (x86_
64) Debian 10 (x86_
64) Debian 11 (x86_
64) Microsoft Windows (x86_
64) Red Hat Enterprise Linux 7 (x86_
64) Red Hat Enterprise Linux 8 (x86_
64) Red Hat Enterprise Linux 9 (x86_
64) Rocky Linux 8 (x86_
64) Rocky Linux 9 (x86_
64) Ubuntu 18.04 (x86_
64) Ubuntu 20.04 (x86_
64) Ubuntu 22.04 (x86_
64)
Available Output Formats
The following output formats are available:
json
json pretty
xml
mysql
classic
csv
tsv
sqlplus
html
modern
none
Set Output Format via Interactive Shell
The output format can be set in an interactive shell using the output
sub-command:
MariaDB (No Database) » output modern
Output format changed to modern
The output format can also be hot-swapped for a single query by prefixing the query with the output
sub-command:
MariaDB (No Database) » output classic SELECT 1;
Output format changed to classic
+---+
| 1 |
+---+
| 1 |
+---+
Set Output Format via CLI
The output format can also be set using the -o
or --output
CLI options:
$ mariadb-shell \
--host HOSTNAME --port TCP_PORT \
--user DATABASE_USER --password USER_PASSWORD \
--output modern