Connect to Nebula Graph

On Nebula Graph Cloud Service, after a Nebula Graph instance is created, Studio on Cloud is deployed automatically, and you can connect to Studio with one click. For more information, see Nebula Graph Cloud Service User Guide. But for Docker-based Studio, when it is started, you must configure it to connect to Nebula Graph. This article introduces how to connect Docker-based Studio to Nebula Graph.

Prerequisites

Before you connect Docker-based Studio to Nebula Graph, you must do a check of these:

  • The Nebula Graph services and Studio are started. For more information, see Deploy Studio.
  • You have the IP address and the port used by the Graph service of Nebula Graph. The default port is 3699.

    NOTE: Run ifconfig or ipconfig on the machine to get the IP address.

  • You have a Nebula Graph account and its password.

    NOTE: If authentication is enabled in Nebula Graph and different role-based accounts are created, you must use the assigned account to connect to Nebula Graph. If authentication is disabled, you can use the default username (user) and the default password (password) to connect to Nebula Graph. For more information, see Nebula Graph Database Manual.

Procedure

To connect Docker-based Studio to Nebula Graph, follow these steps:

  1. On the Config Server page of Studio, configure these fields:

    • Host: Enter the IP address and the port of the Graph service of Nebula Graph. The valid format is IP:port. The default port is 3699.

      NOTE: When Nebula Graph and Studio are deployed on the same machine, you must enter the IP address of the machine, but not 127.0.0.1 or localhost, in the Host field.

    • Username and Password: Enter a valid Nebula Graph account and its password.
      • If authentication is not enabled, you can use user and password.
      • If authentication is enabled and no accounts are created, you must use root and its password nebula.
      • If authentication is enabled and different role-based accounts are created, you must use the assigned account and its password.

        The Config Server page shows the fields to be configured for connection

  2. After the configuration, click the Connect button.
    If you can see the Console page, Docker-based Studio is successfully connected to Nebula Graph.

    The Console page shows and it means that the connection is successful

One session continues up to 30 minutes. If you do not operate Studio within 30 minutes, the active session will time out and you must connect to Nebula Graph again.

Next to do

When Studio is successfully connected to Nebula Graph, you can do these operations:

  • If your account has GOD or ADMIN privilege, you can create a schema on the Console page or on the Schema page.
  • If your account has GOD, ADMIN, DBA, or USER privilege, you can batch import data on the Import page or insert data with nGQL statements on the Console page.
  • If your account has GOD, ADMIN, DBA, USER, or GUEST privilege, you can retrieve data with nGQL statements on the Console page or explore and analyze data on the Explore page.