Docs
AutoCompletion
Auto-completion kicks in as soon as you start typing. The suggestions are context sensitive so the REPL will only suggest relevant items.
Config
The config file for mycli is located in the home folder (~/.myclirc).
Colors
Syntax highlighting has plenty of themes that can be changed via the config file.
Showcase of various color themes:
Commands
Mycli has an assortment of commands to help you as you interact with a database.
Keybindings
There are two types of keybindings available. Emacs mode and Vi mode. The keybindings can be changed via the config file (~/.myclirc) or toggled via F4 key.
Favorite Queries
Frequently used queries can be saved as favorite queries with a name.
Logging
Default log file is located at ~/.mycli.log
. There is additional user friendly audit logging.
Open Editor
Use the \e
command in the prompt, to launch the default editor.
Multi-line mode
Mycli doesn't expect a semi-colon at the end of a line to execute the query. But this can be changed by setting the multi-line mode.
History & Search
MyCli keeps track of the queries entered in the repl. Up/Down arrow can be used to navigate the history.
Pressing <C-r>
will enable incremental history search. So press <C-r>
and then
start typing your search term to see the queries narrowed down. You can cycle
through the matches by pressing <C-r>
again.
Working with multiple servers
When working with multiple servers, it is possible to store their connection parameters using
mysql_config_editor
, and connect providing --login-path <name> <database>
with a server alias.
Pager Output
Mycli uses pager programs to make it easier to view large result sets. This can be configured or disabled.
Prompt
Mycli has a configurable prompt.
Connect
How to connect to a MySQL compatible server using Mycli