Download PDFSubmit Feedback

  • Prerequisites
  • Insecure Mode
  • Secure Mode

Connect to KWDB Using the kwbase CLI Tool

This section explains how to connect to KWDB using kwbase, the built-in command-line interface (CLI) client. You can connect in either non-secure mode for testing purposes or secure mode for production environments.

Prerequisites

Note

For containerized deployments, connect to the database using the following command format:

docker exec -it <container-name> ./kwbase sql [security-opions] --host=<your-host-ip> [-u <username>]

Insecure Mode

Note

Insecure mode should only be used for testing purposes.

  • Connect as the database deployment user.

    ./kwbase sql --insecure --host=<your-host-ip>
    
  • Connect as a regular user.

    ./kwbase sql --insecure --host=<your-host-ip> -u <username>
    

Secure Mode

  • Connect as the database deployment user.

    ./kwbase sql --certs-dir=/etc/kaiwudb/certs --host=<your-host-ip> 
    
  • Connect as a regular user.

    ./kwbase sql --certs-dir=/etc/kaiwudb/certs --host=<your-host-ip> -u <username>