Skip to main content

About MariaDB Shell

MariaDB Shell is an interactive SQL and Python client for MariaDB Server, derived from MySQL Shell and built on MariaDB Connector/C.

MariaDB Shell is a command-line client and scripting environment for MariaDB Server. It combines an SQL console with a Python interpreter, and adds utilities for logical backups, data migration, local test servers, and diagnostics.

MariaDB Shell is derived from MySQL Shell. It keeps the shell's architecture and its scripting API, but it is built against MariaDB Server sources and links MariaDB Connector/C. All connections use the classic client/server protocol. Features of MySQL Shell that depend on MySQL-only server functionality are not included; see Differences from MySQL Shell.

The executable is mariadb-shell. Every installation also provides the short alias msh.

mariadb-shell app_user@db1.example.com:3306/shop

Key Features​

FeatureDescription
SQL and Python modesRun SQL statements interactively, or switch to Python with \py to script the same connection. See SQL and Python Modes.
Interactive editingMulti-line input, persistent per-mode history, an external editor with \edit, and autocompletion of SQL keywords and schema object names. See Editing and History and Autocompletion.
Output formatsTable, vertical, tab-separated, JSON, and NDJSON output, with optional column type information and a pager. See Output Formats and Pager.
Flexible connectionsmariadb:// URIs, TCP/IP, Unix sockets and Windows named pipes, TLS, compression, option files, and SSH tunnels with mariadb+ssh://. See Connecting to a Server.
Credential storeSave passwords in the macOS Keychain, the Windows Credential Manager, or a ~/.mylogin.cnf login path on Linux. See Credential Store.
Dump, load, and copyParallel, chunked, compressed logical dumps of an instance, schemas, or tables, to local disk or object storage, and parallel loads that can resume. The copy utilities stream directly from one server to another. MariaDB objects such as sequences, packages, and system-versioned tables are supported. See Dump and Load.
Table export and importExport one table to a delimited file, or load delimited files into a table over parallel connections. See Table Export and Import.
Sandbox instancesDeploy, start, stop, and delete throwaway local MariaDB or MySQL servers for testing with the sandbox global object. See Sandbox Instances.
Command line integrationCall any utility from your operating system shell without entering the interactive shell, for example mariadb-shell -- util dump-schemas shop --output-url=/backups/shop. See Command Line Integration.
DiagnosticsCollect server and shell state into a single archive for troubleshooting. See Diagnostics Utilities.
ExtensibilityReports, extension objects, plugins, and SQL handlers written in Python. See Extending MariaDB Shell.
CustomizationStartup scripts, persistent configuration options, and prompt themes, including themes for Nerd Fonts and a %vendor% variable that shows whether you are connected to MariaDB or MySQL. See Customizing MariaDB Shell.

Supported Platforms​

Release packages are built for the following platforms:

Operating systemArchitecturesMinimum version
Linuxx86-64, ARM64glibc 2.34 (for example, RHEL 9, Ubuntu 22.04, Debian 12, or later)
macOSx86-64macOS 15
macOSARM64 (Apple silicon)macOS 26
Windowsx86-64, ARM64Windows 10 version 1803 or later for the installation script

Linux distributions that use musl libc, such as Alpine Linux, are not supported. 32-bit systems are not supported.

Each package bundles its own Python runtime, so you don't need to install Python separately. See Installation.

Server Compatibility​

MariaDB Shell is designed for MariaDB Server, and its utilities support MariaDB-specific objects and behavior. Because it uses the classic protocol, it can also connect to MySQL servers. The connected server's vendor is available in a session as session.server_vendor, and some features, such as dump and load, apply vendor-specific rules. For example, a dump taken from a MariaDB server can only be loaded into a MariaDB server.

To see which MariaDB Server version a build was compiled against, run:

mariadb-shell --version

Versioning​

MariaDB Shell versions use the format YY.M.patch: the last two digits of the year, the month, and a patch number. For example, version 26.9.5 is the fifth patch release of the September 2026 line. Release tags add a v prefix, for example v26.9.5.