An intuitive feature-rich terminal tool for monitoring MySQL in real-time
![Screenshot 2023-08-22 at 12 11 04 AM](https://private-user-images.githubusercontent.com/13244625/262220791-3030f08d-2b85-449a-8438-12a54101c58a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxNTAxMiwicGF0aCI6Ii8xMzI0NDYyNS8yNjIyMjA3OTEtMzAzMGYwOGQtMmI4NS00NDlhLTg0MzgtMTJhNTQxMDFjNThhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA0MzY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkM2YyOTY5OGRlYmI2MmNkMGM2MDIyZDUwYWU4NmRkNmI0M2U1OGViZTk3NzVkNGQ2N2E5YWJiYTc0YjRkZjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RQQb79Lc8zi6NabhyUKWcUMV7eveq8PTE5107G8ZZoM)
![Screenshot 2023-08-22 at 12 05 29 AM](https://private-user-images.githubusercontent.com/13244625/262220874-41c7b1db-e404-42ee-9721-e0d73cfa14f7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxN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XJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0NzcxMjFiY2FmMWU3NTk5ZjI3OGFkNzJiM2U2YzRlOTlhMmI2MmEyNWYxOGUyN2E0ZDQ4ZWVhODdjNmFhMDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1LJYXPViE-OENPRfOkGK0aRar6qpw5pTMiC_PhCAogA)
![Screenshot 2023-08-22 at 12 45 19 AM](https://private-user-images.githubusercontent.com/13244625/262222576-3265e19d-bdd7-461d-b7fa-a72a061d3563.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxNTAxMiwicGF0aCI6Ii8xMzI0NDYyNS8yNjIyMjI1NzYtMzI2NWUxOWQtYmRkNy00NjFkLWI3ZmEtYTcyYTA2MWQzNTYzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA0MzY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRmOWM4ZGJmOTk2MmQyMzIwZDIxM2JhNmEwZDJkODY1YTNlNWZjMDRiZGVlYjk5NzgxYjgwMzA0YWQ4ODNlNWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.NcWi6qTfrnAgmkNUv0Sb0axYqCTgAEqgf79a9AYR3ZU)
![Screenshot 2023-08-22 at 12 54 32 AM](https://private-user-images.githubusercontent.com/13244625/262226286-73582b19-81ad-4cfe-a814-f9b20afc6903.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxNTAxMiwicGF0aCI6Ii8xMzI0NDYyNS8yNjIyMjYyODYtNzM1ODJiMTktODFhZC00Y2ZlLWE4MTQtZjliMjBhZmM2OTAzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA0MzY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIzMTMwODcwMDNjZWMwNTMwZmY4OGE5NzJmODI3ZDFhZmY0ZTdmOTg0NGRiMGQ1NDkwNWYyMDI3OTg4MTc1YzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Sl3-vPNaGxlwc5JxGaYZt5Z6fM1fDwCqvHCw8d66cic)
![Screenshot 2023-08-22 at 12 42 23 AM](https://private-user-images.githubusercontent.com/13244625/262222287-20545496-f6fa-4b41-8cbf-91ec7f370249.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxNTAxMiwicGF0aCI6Ii8xMzI0NDYyNS8yNjIyMjIyODctMjA1NDU0OTYtZjZmYS00YjQxLThjYmYtOTFlYzdmMzcwMjQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA0MzY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcyZTMwYzVmZjM5ODViNGE4ZTJmOGMwOWFkOWYyNDBhZDVmZDczZjQ0NGI3ZmZhYWFjYzMxMjRlYjQ2YjU1MzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Uv4u1zEcp0f2nrZbKsHKTY8Jnd5Lpc8X_DWvddoGccI)
![Screenshot 2023-08-22 at 12 08 33 AM](https://private-user-images.githubusercontent.com/13244625/262223502-fca0bfc6-a000-4719-8908-02cbfdf2e476.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxNTAxMiwicGF0aCI6Ii8xMzI0NDYyNS8yNjIyMjM1MDItZmNhMGJmYzYtYTAwMC00NzE5LTg5MDgtMDJjYmZkZjJlNDc2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA0MzY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY2YTYzMjNiMDVjYzkwMjY0OTE4MWQwZGJkNWQ4MWJlYjExNTA2ZjVhYWI4MzhlNWQ2ODNmMjZiZWQ1YTNjY2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.mf-3SKoK2HSRAgk4xYHZsG_RjKeRH3C0qaICJp9tut8)
![Screenshot 2023-08-17 at 6 38 00 AM](https://private-user-images.githubusercontent.com/13244625/261283797-657cd4b0-0ff7-49df-a176-e23bf6fa7f9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxNTAxMiwicGF0aCI6Ii8xMzI0NDYyNS8yNjEyODM3OTctNjU3Y2Q0YjAtMGZmNy00OWRmLWExNzYtZTIzYmY2ZmE3ZjliLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA0MzY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE0ZmVjM2YyZjY4YzUyYzI4OGVjNTU5NWUzYTQ5MTNkNmZhMWNlYzYyOTlkZmJlY2RkYWIyNWY0NzA0Yzc1MWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.7xNfWtJWBoOs9vP7wTCnWVNWTPsHBxQ2hA2RmSBE-wM)
![Screenshot 2023-08-22 at 12 20 37 AM](https://private-user-images.githubusercontent.com/13244625/262221023-d7625991-8960-4451-9167-99e6f24f3367.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxNTAxMiwicGF0aCI6Ii8xMzI0NDYyNS8yNjIyMjEwMjMtZDc2MjU5OTEtODk2MC00NDUxLTkxNjctOTllNmYyNGYzMzY3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA0MzY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMyMDMyNDk3MGVlY2ZkZjM2NjY2NGMwMDBiMTJjZDY3OTU2MTFkZTQwZjk2NWQxZjNiNzg0ZWUyYWZjYmZhODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.MRNaCS5j2hDm4dAIoyXY5VYoIVp1GN7AJARQ03mntqg)
![Screenshot 2023-08-22 at 12 44 35 AM](https://private-user-images.githubusercontent.com/13244625/262222421-47141444-5827-495c-84a6-d810be672711.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyMTUzMTIsIm5iZiI6MTcyNDIxNTAxMiwicGF0aCI6Ii8xMzI0NDYyNS8yNjIyMjI0MjEtNDcxNDE0NDQtNTgyNy00OTVjLTg0YTYtZDgxMGJlNjcyNzExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDA0MzY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM3MDZmMzkwZDgzMDE1ZGFkN2JmMzNhMTAwN2NjZjE1YWRkYzIxZDZjN2JlZmU1NDI2MTAxNjYxMDhiNzVmOTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.uc8_oxzqOyPyzvJIMIMZDuHHcRsUhp9EECHNbzu7QC4)
Requires Python 3.8+
$ pip install dolphie
$ curl -sSL https://install.python-poetry.org | python3 -
$ poetry install
If you are a Homebrew user, you can install dolphie via
$ brew install dolphie
$ docker pull ghcr.io/charles-001/dolphie:latest
$ docker run -dit --name dolphie ghcr.io/charles-001/dolphie:latest
$ docker exec -it dolphie dolphie -h host.docker.internal -u root --ask-pass
positional arguments:
uri Use a URI string for credentials - format: mysql://user:password@host:port (port is optional with default 3306)
options:
--help show this help message and exit
-u USER, --user USER Username for MySQL
-p PASSWORD, --password PASSWORD
Password for MySQL
--ask-pass Ask for password (hidden text)
-h HOST, --host HOST Hostname/IP address for MySQL
-P PORT, --port PORT Port for MySQL (Socket has precendence)
-S SOCKET, --socket SOCKET
Socket file for MySQL
-c CONFIG_FILE, --config-file CONFIG_FILE
Config file path to use. This should use [client] section. See below for options support [default: ~/.my.cnf]
-f HOST_CACHE_FILE, --host-cache-file HOST_CACHE_FILE
Resolve IPs to hostnames when your DNS is unable to. Each IP/hostname pair should be on its own line using format: ip=hostname [default: ~/dolphie_host_cache]
-q QUICK_SWITCH_HOSTS_FILE, --quick-switch-hosts-file QUICK_SWITCH_HOSTS_FILE
Specify where the file is that stores the hosts you connect to for quick switching [default: ~/dolphie_quick_switch_hosts]
-l LOGIN_PATH, --login-path LOGIN_PATH
Specify login path to use mysql_config_editor's file ~/.mylogin.cnf for encrypted login credentials. Supercedes config file [default: client]
-r REFRESH_INTERVAL, --refresh_interval REFRESH_INTERVAL
How much time to wait in seconds between each refresh [default: 1]
-H HEARTBEAT_TABLE, --heartbeat-table HEARTBEAT_TABLE
If your hosts use pt-heartbeat, specify table in format db.table to use the timestamp it has for replication lag instead of Seconds_Behind_Master from SHOW SLAVE STATUS
--ssl-mode SSL_MODE Desired security state of the connection to the host. Supports: REQUIRED/VERIFY_CA/VERIFY_IDENTITY [default: OFF]
--ssl-ca SSL_CA Path to the file that contains a PEM-formatted CA certificate
--ssl-cert SSL_CERT Path to the file that contains a PEM-formatted client certificate
--ssl-key SSL_KEY Path to the file that contains a PEM-formatted private key for the client certificate
--panels STARTUP_PANELS
What panels to display on startup separated by a comma. Supports: dashboard/replication/processlist/graphs [default: dashboard,processlist]
--show-trxs-only Start with only showing threads that have an active transaction
--additional-columns Start with additional columns in Processlist panel
--use-processlist Start with using Information Schema instead of Performance Schema for processlist panel
-V, --version Display version and exit
Config file with [client] section supports these options:
host
user
password
port
socket
ssl_mode REQUIRED/VERIFY_CA/VERIFY_IDENTITY
ssl_ca
ssl_cert
ssl_key
Login path file supports these options:
host
user
password
port
socket
Environment variables support these options:
DOLPHIE_USER
DOLPHIE_PASSWORD
DOLPHIE_HOST
DOLPHIE_PORT
DOLPHIE_SOCKET
- MySQL/Percona Server 5.6/5.7/8.0+
- RDS/Aurora
- PROCESS (if you don't use
performance_schema
) - SELECT to
performance_schema
(if used) +pt-heartbeat table
(if used) - REPLICATION CLIENT/REPLICATION SLAVE
- BACKUP_ADMIN (MySQL 8 only)
- PROCESS (if you don't use
performance_schema
) - Global SELECT access (good for explaining queries, listing all databases, etc)
- REPLICATION CLIENT/REPLICATION SLAVE
- SUPER (required if you want to kill queries)
- BACKUP_ADMIN (MySQL 8 only)
- Dolphie uses panels to present groups of data. They can all be turned on/off to have a view of your database server that you prefer (see Help screenshot for panels available)
- Graphs for many metrics that can give you great insight into how your database is performing
- Sparkline to show queries per second in a live view
- Quick switch host for connecting to different hosts instead of reloading the application. It keeps a history of the servers you connect to that provides autocompletion for hostnames
- Prefers Performance Schema over Processlist if it's turned on for listing queries. Can be switched to use Processlist by pressing key "1" (or using parameter) since P_S can truncate query length for explaining queries
- 3 options for finding replica lag in this order of precedence:
pt-heartbeat table
(specified by--heartbeat-table
)Performance Schema
(MySQL 8 only)SHOW SLAVE STATUS
- Host cache file. This provides users a way to specify hostnames for IPs when their network's DNS can't resolve them. An example use case for this is when you connect to your work's VPN and DNS isn't available to resolve IPs. In my opinion, it's a lot easier to look at hostnames than IPs!
- Supports encrypted login credentials via
mysql_config_editor
- Automatic conversion of large numbers & bytes to human-readable
- Notifies when new version is available
- Many commands at your fingertips with autocompletion for their input
Order of precedence for variables passed to Dolphie:
- Command-line
- Environment variables
- ~/.mylogin.cnf (
mysql_config_editor
) - ~/.my.cnf
I welcome all questions, bug reports, and requests. If you enjoy Dolphie, please let me know! I'd love to hear from you ๐