Rate This Document
Findability
Accuracy
Completeness
Readability

Connecting to NebulaGraph Services

NebulaGraph provides a command-line tool nebula-console for connection and testing.

  1. Download the latest binary file of the nebula-console.
    1
    2
    wget https://github.com/vesoft-inc/nebula-console/releases/download/v3.8.0/nebula-console-linux-arm64-v3.8.0 --no-check-certificate
    mv nebula-console-linux-arm64-v3.8.0 nebula-console
    
  2. Grant the execute permission of the binary file to the user.
    1
    chmod 111 nebula-console
    
  3. Run the following command to connect to NebulaGraph:
    1
    ./nebula-console -addr 127.0.0.1 -port 9669 -u root -p nebula
    

nebula-console syntax:

1
2
./nebula-console -addr <ip> -port <port> -u <username> -p <password>
[-t 120] [-e "nGQL_statement" | -f filename.nGQL]

Parameter

Description

-h/-help

Displays the help menu.

-addr/-address

Sets the IP address or host name of the Graph service to be connected. The default address is 127.0.0.1.

-P/-port

Sets the port number of the Graph service to be connected. The default port number is 9669.

-u/-user

Sets the username of your NebulaGraph account. If identity authentication is not enabled, you can use any existing username (root by default).

-p/-password

Sets the password of your NebulaGraph account. If identity authentication is not enabled, you can use any characters as the password.

-t/-timeout

Sets an integer-type timeout threshold of the connection. The default value is 120, in milliseconds.

-e/-eval

Sets a string-type nGQL statement. The nGQL statement is executed once the connection succeeds. The connection stops after the result is returned.

-f/-file

Sets the path to the file that stores nGQL statements. The nGQL statements in the file are executed once the connection succeeds. The result will be returned and the connection stops then.

-enable_ssl

Enables SSL encryption for connecting to NebulaGraph.

-ssl_root_ca_path

Sets the path for storing the CA certificate.

-ssl_cert_path

Sets the path for storing the CRT certificate.

-ssl_private_key_path

Sets the path for storing the private key file.