Connect to Milvus Server

This section covers fundamentals and basic Milvus operations.

If you choose to operate in the Python interactive mode, type python3 in your terminal.

Connect to the Milvus server

>>> from pymilvus import connections
>>> connections.connect("default", host='localhost', port='19530')
import { MilvusClient } from "@zilliz/milvus2-sdk-node";
const milvusClient = new MilvusClient("localhost:19530");

Disconnect from the Milvus server

When you no longer need Milvus services, you can release all connection resources of the Milvus server:

>>> connections.disconnect("default")
await milvusClient.closeConnection();
Is this page helpful?
Scored Successfully!