Docs Menu
Manage Database Connections
This topic describes how to connect to and disconnect from a Zilliz Cloud database.
Prerequisites
- A Zilliz Cloud account.
- An active project and a database within it.
- User access to the project and database within.
- Your IP address added in the IP White List.
- PyMilvus or Java SDK installed on your local device.
Check the Zilliz Cloud database endpoint
Log in your Zilliz Cloud account. In the Databases tab, click Connect Service on the card that represents your Zilliz Cloud database to enter the Connect your service pop-up window.
Copy the endpoint information of your Zilliz Cloud database.
You can also copy the Quick Start code and integrate it directly in your own script. Switch to your programming language by clicking the corresponding tab on the top of the pop-up window.
Connect to a Zilliz Cloud database
Construct a Zilliz Cloud database connection.
# Run `python3` in your terminal to operate in the Python interactive mode.
from pymilvus import connections
connections.connect(
alias="default",
host='endpoint',
port='19530',
user='user',
password='password'
)
final MilvusServiceClient milvusClient = new MilvusServiceClient(
ConnectParam.newBuilder()
.withHost("endpoint")
.withPort(19530)
.withUser("user")
.withPassword("password")
.build()
);
Parameter | Description |
---|---|
alias |
Alias of the Zilliz Cloud database connection to construct. |
host |
Endpoint of the Zilliz Cloud database. |
port |
Port of the Zilliz Cloud database. |
secure |
Boolean value to control the secure mode of the Zilliz Cloud database. |
user |
Username of the user to log in the Zilliz Cloud database. |
password |
Password of the user to log in the Zilliz Cloud database. |
Parameter | Description |
---|---|
Host |
Endpoint of the Zilliz Cloud database. |
Port |
Port of the Zilliz Cloud database. |
User |
Username of the user to log in the Zilliz Cloud database. |
Password |
Password of the user to log in the Zilliz Cloud database. |
Disconnect from a Zilliz Cloud database
Disconnect from a Zilliz Cloud database.
connections.disconnect("default")
milvusClient.close()
Parameter | Description |
---|---|
alias |
Alias of the Zilliz Cloud database to disconnect from. |
Troubleshooting
Should you meet any trouble when connect to your Zilliz Cloud database, see the Troubleshooting guide.