Connect to a Database

This guide walks you through how to access a database on Zilliz Cloud. You will learn how to obtain the database endpoint, configure the network access whitelist, and connect to a database.

Before you start

Ensure that

  • You have signed up on Zilliz Cloud.
  • You have created a vector database.

Configure the network access whitelist

To make your project publicly accessible from your IP address, you need to add your IP address to the network access list.

  1. In the Summary section on the Overview tab of a database, click Go and Configure on the right of Network Access to open the project page.
  2. On the Network Access tab, click Add now.
  3. In the prompted dialog box, click Submit or enter the IP address manually in Network Access (CIDR).
  4. Click Submit to save the record. Note that you can add a maximum of 20 records to a project.

Add network access whitelist Add network access whitelist

Obtain database endpoint

A database endpoint exposes the database to the public Internet. After creating a vector database on Zilliz Cloud, open the database page and

  1. Obtain the endpoint in the Quick Connect section on the Overview tab.
  2. View your user name on the Users tab.

Get endpoint Get endpoint

Connect to a vector database from the Internet

Initiate a connection to the database as follows:

# Run `python3` in your terminal to operate in the Python interactive mode.
from pymilvus import connections

  uri='endpoint', #  Public endpoint obtained from Zilliz Cloud
  user='user', # Username specified when you created this database 
  password='password' # Password specified when you created this database

Next steps