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
- 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.
- 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.
- On the Network Access tab, click Add now.
- In the prompted dialog box, click Submit or enter the IP address manually in Network Access (CIDR).
- Click Submit to save the record. Note that you can add a maximum of 20 records to a project.
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
- Obtain the endpoint in the Quick Connect section on the Overview tab.
- View your user name on the Users tab.
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 connections.connect( alias="default", uri='endpoint', # Public endpoint obtained from Zilliz Cloud secure=True, user='user', # Username specified when you created this database password='password' # Password specified when you created this database )