milvus-logo
LFAI
< Docs

create_user()

This method creates a user. You have to specify a user name and a password. The user name must be unique globally.

Invocation

create_user(user, password, using="default")

Parameters

ParameterDescriptionTypeRequired
userName of the user to be createdStringTrue
passwordPassword of the user to be createdStringTrue
usingAlias of the Milvus connection to be attached toStringFalse

Return

No return.

Example

from pymilvus import connections, utility
connections.connect()
utility.create_user(user, password)
connections.connect(user=user, password=password)
users = utility.list_usernames()
print(f"users in Milvus: {users}")
Feedback

Was this page helpful?