Skip to main content

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();
info

To install MariaDB Shell, run the install script for your platform as described in Installation. The executable is mariadb-shell, with msh as a short alias.

What MariaDB Shell is, its main features, the platforms it runs on, and the servers it connects to.

How to install, upgrade, and remove MariaDB Shell on Linux, macOS, and Windows with the install scripts or from a release package.

How to start the shell, open a session, use the global objects, and what differs from MySQL Shell.

Connection URIs including mariadb:// and mariadb+ssh://, option files, TLS, SSH tunnels, compression, and stored credentials.

Shell commands, SQL and Python modes, editing and history, batch scripts, output formats, and calling the API from the command line.

Parallel dump, load, and copy, table export and import, password changes, and diagnostics collection.

How to deploy and manage local MariaDB and MySQL servers for testing and development.

How to develop, release, and deploy a versioned database schema with MariaDB Schema Management.

How to configure, start, and secure the MCP server that gives AI agents access to your MariaDB servers.

Reports, extension objects, plugins, and SQL handlers written in Python.

Startup scripts, prompt themes, configuration options, and Python module search paths.

The application log, log levels, verbose output, and SQL logging.

Every command-line option of mariadb-shell.

The files MariaDB Shell reads and writes, and the environment variables it recognizes.

Background on how parts of MariaDB Shell work, such as the credential helpers.

The license that MariaDB Shell is distributed under.