[System environment]:
- windows 11
- mycli 1.26.1
- mysql Ver 8.0.33
【About mycli】:
mycli is a MySQL/MariaDB/Percona client that supports auto-completion and syntax highlighting . It is a client tool developed in python. It mainly calls the prompt_toolkit library to build interactive command line applications. After installing mycli, you can implement mysql code Highlighting and auto-completion functions.
[Specific steps to install mycli]:
1. Return to the local terminal and enter the command:
pip install mycli
2. You may be prompted to upgrade pip. In this case, enter the command to upgrade pip:
python.exe -m pip install --upgrade pip
- The picture below is a screenshot after successfully upgrading pip:
3. After upgrading pip, re-execute the first command to complete the installation and download of mycli:
pip install mycli
4. Execute the following command to log in to the database:
mycli -u root -p password
5. When you enter a statement at this time, you will find that there are more code completion and highlighting functions.
The above is all about using Mycli to set Mysql code highlighting.