Using MariaDB Shell
Work with MariaDB Shell day to day: shell commands, SQL and Python modes, completion, history, batch runs, result formats, command line integration, and the pager.
MariaDB Shell is an interactive client and a scripting environment at the same time. You type SQL or Python at the prompt, control the shell itself with backslash commands such as \use or \option, and run the same work unattended from scripts, cron jobs, or CI pipelines.
The pages in this section describe how to work with the shell once it's installed and connected. To install it, see Installation. To open a connection, see Connecting to a Server.
The built-in backslash commands, their aliases and syntax, with details on the ones that need explanation.
How to switch between SQL and Python, enter multi-line statements, and run SQL from Python code.
Tab completion for SQL keywords, database object names, Python objects, and shell commands.
Line-editing keys, editing statements in an external editor, and the command history.
How to run SQL and Python scripts non-interactively, pass arguments to them, and evaluate exit codes.
Table, tabbed, vertical, and JSON result formats, column metadata, and formatting results from Python.
How to call util, shell, and sandbox operations directly from the operating system shell.
How to page long results through less, more, or another program.