milvus用户管理

milvus:2.5.14

 

1.创建用户

在milvus服务器上执行

export CLUSTER_ENDPOINT="http://localhost:19530"
export TOKEN="root:Milvus"

curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/create" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
    "userName": "hxl",
    "password": "hl123456"
}'

 

2.更新密码

export CLUSTER_ENDPOINT="http://localhost:19530"
export TOKEN="root:Milvus"
curl --request POST \
--url "${CLUSTER_ENDPOINT}/v2/vectordb/users/update_password" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Content-Type: application/json" \
-d '{
    "newPassword": "hxl123456",
    "userName": "hxl",
    "password": "hl123456"
}'

 

posted @ 2025-07-30 10:20  slnngk  阅读(56)  评论(0)    收藏  举报