Use Mycli to implement Mysql code highlighting and automatic completion

[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
image-20230426231824557

2. You may be prompted to upgrade pip. In this case, enter the command to upgrade pip:

 python.exe -m pip install --upgrade pip
image-20230426232019320
  • The picture below is a screenshot after successfully upgrading pip:
    image-20230426232214616

3. After upgrading pip, re-execute the first command to complete the installation and download of mycli:

pip install mycli
image-20230426232342511

4. Execute the following command to log in to the database:

mycli -u root -p password
image-20230427161912493

5. When you enter a statement at this time, you will find that there are more code completion and highlighting functions.

image-20230427162230334

The above is all about using Mycli to set Mysql code highlighting.

Guess you like

Origin blog.csdn.net/m0_63428773/article/details/130410518