Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Text user interface MySQL client

Project description

Build Status


MitzaSQL is a free Python3 TUI MySQL client for Linux which aims to provide an easy-to-use console alternative to GUI clients. It is not meant to be a full-fledged GUI client, it only provides a read-only view of the database, though you can manipulate the data by using raw SQL queries. Some of the main features are:

  • Manage multiple sessions
  • View databases
  • View list of tables, sql views & stored procedures in a database
  • View rows in a table or sql view:
  • Easily sort table data
  • Filter table data using VIM-like commands (:like, :gt, :lt, :in...)
  • SQL Query editor with syntax highlighting
  • VIM style keyboard shortcuts
  • VIM style commands with autocomplete support
  • Macros support

MitzaSQL is heavily inspired by HeidiSQL and is licensed under MIT.




System requirements

  • Linux
  • Python3 (3.5 - 3.8)
  • MySQL (5.5 - 8)


By default MitzaSQL stores connection credentials in plain text files in your home directory. If security is a concern you could store the file in an encrypted partition/directory and specify the path to the session file when the program starts using the --sessions_file /path/to/sessions.ini flag. Another option would be not to persist the connection credentials when creating a new session.

Performance & known issues

Loading large datasets will slow down the rendering. By default, when opening a table screen only the first 100 records are loaded. The rest of the data is loaded automatically when scrolling down. When running queries with the SQL Query editor make sure you don't load a large number of records or else your user experience might suffer.


  • urwid
  • mysql-connector-python
  • appdirs
  • pygments


pip3 install mitzasql



  • tox
  • Docker
  • docker-compose

Docker is only required for running the integration tests, testing during feature development can be done with tox alone (see below).

Run the development version

# If your currently installed Python version != 3.6 use TOXENV to specify it
tox -e dev
source .tox/dev/bin/activate

To run the program using a different Python version using Docker:

./ [python version] [mysql version]
# ./ 36 mysql55
tox -e dev
source .tox/dev/bin/activate


The testing process uses tox & Docker to automate running the tests against multiple versions of Python and MySQL servers.

During feature development Docker is not really necessary, I use it to run the test MySQL server but it that can be installed directly on the host. If that is the case, then new connection details have to be specified using environmental variables (see tests/db/ for more details).

To run the tests during feature development run:

cp env.template .env # necessary if using Docker
docker-compose up # necessary if using Docker

To generate code coverage:


Code coverage is generated in the htmlcov directory.

Integration testing

See for more info.

UI testing

See for more info.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mitzasql, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size mitzasql-1.2.0-py3-none-any.whl (118.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size mitzasql-1.2.0.tar.gz (57.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page