--- id: mycli version: "2.13.2" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # mycli — Rich MySQL terminal client with autocompletion, syntax highlighting, and dataframes License: permissive · Maintenance: active · Downloads: 132.5K/mo ## What it is and what it does mycli is a terminal-based MySQL client that replaces the standard mysql command-line tool with a modern, interactive interface. It connects to MySQL, MariaDB, Percona, TiDB, and Apache Doris databases and provides context-aware SQL auto-completion (suggesting table names after FROM, column names after WHERE), syntax highlighting via Pygments, and fuzzy history search. It supports multiline queries, favorite queries with Jinja templating, shell-style output redirection, and optional integration with Polars for dataframe transforms and plots. The package has 19 runtime dependencies including prompt_toolkit (the interactive UI backbone), PyMySQL (database connection), sqlparse and sqlglot (SQL parsing), and optional tools like pyfzf (fuzzy search) and keyring (password storage). Installation is straightforward via pip; the project is actively maintained (last commit 2026-08-12) and well-established (first release 2015-07-26). It requires Python 3.10 or later and is tested on macOS and Linux with partial support for Windows and WSL. Use it for: - Interactive MySQL development and debugging when you need auto-completion and syntax highlighting instead of the bare mysql CLI. - Running ad-hoc queries with fuzzy history search to quickly find and re-execute previous commands. - Saving and executing parameterized queries using Jinja templating for repeated tasks with different values. - Exploring large result sets using fzf output explorer or piping results to external tools with shell-style redirects. - Querying multiple MySQL-compatible databases (MariaDB, Percona, TiDB, Doris) from a single unified client. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. mycli is a command-line client for MySQL and compatible databases (MariaDB, Percona, TiDB, Apache Doris) that provides auto-completion, syntax highlighting, and interactive query features. Yes, if you regularly work with MySQL or compatible databases from the terminal. The auto-completion, syntax highlighting, and fuzzy search significantly improve the interactive query experience over the standard mysql client. Install via `pip install mycli[all]` to get all optional features. Note one known vulnerability (PYSEC-2023-213) exists; verify it does not affect your use case before deploying in production. ## Install pip install mycli uv add mycli poetry add mycli ## Installing mycli Before you install: Low friction installation as a pure Python wheel. Active maintenance with a recent release (2 days old) and substantial community engagement (11962 GitHub stars). Requires Python 3.10 or better. License in practice: BSD-3-Clause is permissive; you can use mycli freely in commercial and private projects with minimal restrictions, provided you include the license notice. Quickstart: pip install mycli mycli --help mycli -u root -p password -h localhost Requires Python 3.10 or better; a MySQL-compatible database server must be accessible at connection time. Verify before relying: - Whether the single known vulnerability (PYSEC-2023-213) affects current version 2.13.2 or has been patched. - Performance characteristics when handling very large result sets or complex queries. - Stability and feature completeness on Windows (documentation notes partial support). ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 132.5K/month (top 15,000 on PyPI) - Known vulnerabilities: 1 ## Tags mysql command line client, sql terminal with auto-completion, mysql cli with syntax highlighting, interactive database shell, mysql repl, terminal sql client, mysql query tool, cli-tool, database-client, repl [View on SkillFed](https://skillfed.io/packages/mycli) · [View on PyPI](https://pypi.org/project/mycli/)