> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/tools/community/mariadb-shell.md).

# MariaDB Shell

MariaDB Shell is an interactive SQL and Python client for MariaDB Server, with parallel dump, load, and copy utilities, SSH tunnels, and local sandboxes.

MariaDB Shell is a client for MariaDB Server that combines an interactive SQL console with a Python scripting environment. Besides running queries, it backs up, restores, and copies databases in parallel, connects through SSH tunnels, deploys local sandbox servers, and lets you automate and extend all of this in Python.

```
$ mariadb-shell mariadb://root@localhost:3306
MariaDB localhost:3306 ssl  SQL > SELECT VERSION();
```

{% hint style="info" %}
To install MariaDB Shell, run the install script for your platform as described in [Installation](/docs/tools/community/mariadb-shell/installation.md). The executable is `mariadb-shell`, with `msh` as a short alias.
{% endhint %}

{% columns %}
{% column %}
{% content-ref url="/pages/B3c48dVoH4fKX4MPnC2p" %}
[About MariaDB Shell](/docs/tools/community/mariadb-shell/about-mariadb-shell.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
What MariaDB Shell is, its main features, the platforms it runs on, and the servers it connects to.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/guCZO6ibZa6mT4x9QmcD" %}
[Installation](/docs/tools/community/mariadb-shell/installation.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to install, upgrade, and remove MariaDB Shell on Linux, macOS, and Windows with the install scripts or from a release package.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/yHDT2sCibKCo48s7nsIf" %}
[Getting Started](/docs/tools/community/mariadb-shell/getting-started.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to start the shell, open a session, use the global objects, and what differs from MySQL Shell.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/uWRUsZHOOn177sCA4wIi" %}
[Connecting to a Server](/docs/tools/community/mariadb-shell/connecting.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Connection URIs including `mariadb://` and `mariadb+ssh://`, option files, TLS, SSH tunnels, compression, and stored credentials.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/sn77lrs4J57WC91Rz1gq" %}
[Using MariaDB Shell](/docs/tools/community/mariadb-shell/using-mariadb-shell.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Shell commands, SQL and Python modes, editing and history, batch scripts, output formats, and calling the API from the command line.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/rq311rBJFpRmcyMI8m3N" %}
[Utilities](/docs/tools/community/mariadb-shell/utilities.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Parallel dump, load, and copy, table export and import, password changes, and diagnostics collection.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/ptAxFSb35kcXsozH3cfQ" %}
[Sandbox Instances](/docs/tools/community/mariadb-shell/sandbox-instances.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to deploy and manage local MariaDB and MySQL servers for testing and development.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/2jDkzQFFiQM9e2BpwnDo" %}
[Schema Management](/docs/tools/community/mariadb-shell/schema-management.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to develop, release, and deploy a versioned database schema with MariaDB Schema Management.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/9TXEcane4bZ1WL4rhRGv" %}
[MCP Server](/docs/tools/community/mariadb-shell/mcp-server.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
How to configure, start, and secure the MCP server that gives AI agents access to your MariaDB servers.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/0NxvQx8JpgPJYbAUU8fz" %}
[Extending MariaDB Shell](/docs/tools/community/mariadb-shell/extending-mariadb-shell.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Reports, extension objects, plugins, and SQL handlers written in Python.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/hMrRGDj7h6cppHGOR6Jz" %}
[Customizing MariaDB Shell](/docs/tools/community/mariadb-shell/customizing.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Startup scripts, prompt themes, configuration options, and Python module search paths.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/KJ9TFXfj0YIdmoFF87wg" %}
[Logging and Debugging](/docs/tools/community/mariadb-shell/logging-and-debugging.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
The application log, log levels, verbose output, and SQL logging.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/0Mwp4qTjA4CTph1nURE7" %}
[CLI Reference](/docs/tools/community/mariadb-shell/cli-reference.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Every command-line option of `mariadb-shell`.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/4q1EedyKhsIZT0HrIeMQ" %}
[Files and Environment Variables](/docs/tools/community/mariadb-shell/files-and-environment-variables.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
The files MariaDB Shell reads and writes, and the environment variables it recognizes.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/KU1W4hqyDwVfafwRrMps" %}
[Appendix](/docs/tools/community/mariadb-shell/appendix.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
Background on how parts of MariaDB Shell work, such as the credential helpers.
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
{% content-ref url="/pages/lOBwn8nNn31Lu0iUeeVg" %}
[License](/docs/tools/community/mariadb-shell/license.md)
{% endcontent-ref %}
{% endcolumn %}

{% column %}
The license that MariaDB Shell is distributed under.
{% endcolumn %}
{% endcolumns %}

<sub>*This page is licensed: GPLv2*</sub>
