Registry / database / mycli
library1.74.0pypypiunverified

mycli is an interactive command-line client for MySQL, MariaDB, and Percona databases, featuring auto-completion, syntax highlighting, and smart suggestions. It's built on prompt_toolkit and pygments, providing a user-friendly and efficient interface for database administration and querying. The current version is 1.68.1, with a release cadence of minor versions every few weeks to months.

pip install mycli
INSTALL
IMPORT
SIG · MYCLI
M
mycli
databasepythonv1.74.0
Install
8.3s avg
Import
Disk
148MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.74.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 8.3s · import 0.000s · 158MB
148MB installed
● package 148MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mycli
mycli
MyCLI is primarily a command-line interface tool and is not typically imported as a Python library for programmatic use. Its functionality is accessed by running the 'mycli' command in a terminal.

Start MyCLI from your terminal. You can specify connection parameters like host, user, database, and password directly via command-line flags. If a password is required, you'll be prompted for it interactively.

# To connect to a local MySQL instance as root: mycli -u root # To connect to a specific database (e.g., 'testdb') on a remote host (e.g., '192.168.1.100'): mycli -h 192.168.1.100 -u myuser -D testdb -p # To exit the mycli prompt: # \q # (or Ctrl+D)
mycli --version
Debug
Known issues
deprecatedThe environment variable `$MYSQL_UNIX_PORT` has been deprecated. While it may still work, it is recommended to use standard MySQL client configuration methods or command-line flags for specifying the UNIX socket.
fix
Use the `--socket` (or `-S`) command-line option or configure it via a `~/.myclirc` configuration file, or standard MySQL client configuration.
affects: >=1.66.0
gotchaThe `--throttle` command-line option, used for limiting query execution rate in batch mode, changed its expected argument type from an integer to a float.
fix
Ensure that when using `--throttle`, you provide a floating-point number (e.g., `mycli --batch input.sql --throttle 0.5`) rather than an integer.
affects: >=1.67.0
gotchaMyCLI has frequent updates to its `sqlglot` dependency, sometimes requiring specific minor versions or C extensions. This can occasionally lead to installation failures or runtime issues if dependency conflicts arise or if the C extensions fail to compile.
fix
Ensure your build environment has necessary compilers (e.g., `gcc`, `build-essential` on Linux, Xcode command-line tools on macOS). Consider installing MyCLI in a dedicated virtual environment (`python -m venv .venv && source .venv/bin/activate && pip install mycli`) to isolate its dependencies.
affects: All versions
Upgrade
Version history
1.74.0latest on PyPI · released Jun 6, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
mycli — pip install mycli · libregistry