使用 mycli

  1. 使用 mycli 登入 mysql。
    [root@kvm3 ~]# mycli -uroot -p123123
    Connecting to socket /var/lib/mysql/mysql.sock, owned by user mysql
    MariaDB 10.5.16
    mycli 1.26.1
    Home: http://mycli.net
    Bug tracker: https://github.com/dbcli/mycli/issues
    Thanks to the contributor - Nathan Taggart
    
  2. 下命令 show 加空白就會出現提示視窗,列出可以接的參數供您選擇,不用再把完整命令打完。
    MariaDB root@(none):(none)> show
                                      AUTHORS
                                      BINARY LOGS
                                      BINLOG EVENTS
                                      CHARACTER SET
                                      CLIENT_STATISTICS
                                      COLLATION
                                      COLUMNS
     [F3] Multiline: OFF    Right-arrow to complete suggestion
    
  3. 選擇 databases 後執行。
    mariadb root@localhost:(none)> show DATABASES;                                  
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    | mysql              |
    | performance_schema |
    +--------------------+
    3 rows in set
    Time: 0.021s
    mariadb root@localhost:(none)>