在 Milvus 中配置登录密码需要进行以下步骤:
- 在 Milvus 的配置文件中设置
authentication = true
,启用身份验证功能。 - 设置用户名和密码。可以在 Milvus 配置文件中设置或者通过 Milvus SDK 连接时设置。
下面是在 Milvus 配置文件中设置用户名和密码的示例(对应的配置文件为 server_config.yaml
):
...
network:
bind.address: 0.0.0.0
bind.port: 19530
db:
backend_url: mysql://root:123456@192.168.1.100:3306/milvus
security:
enable: true
authentication:
enable: true
username: your_username
password: your_password # 注意将 your_password 替换成您自己的密码
...
完成以上设置后,就可以使用 Milvus SDK 连接 Milvus 并提供正确的用户名和密码了。