← 返回命令列表

Linux command

doctl-databases-user 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List database users

doctl databases user list [cluster_id]

Create a user

doctl databases user create [cluster_id] [username]

Get user info

doctl databases user get [cluster_id] [username]

Reset user auth

doctl databases user reset [cluster_id] [username] [new_auth_mode]

Create a user

doctl databases user create [cluster_id] [username] --mysql-auth-plugin [caching_sha2_password]

List users

doctl databases user list [cluster_id] --format Name,Role

Delete a user

doctl databases user delete [cluster_id] [username]

说明

doctl databases user manages users for DigitalOcean managed database clusters. Users represent authentication credentials that applications and administrators use to connect to databases. Each user has associated credentials (username and password) and potentially different privileges depending on the database engine. User management includes creating users for different applications or services, rotating credentials via password reset, and removing users when access is no longer needed. Proper user management follows security best practices: creating dedicated users for each application, regularly rotating credentials, and removing unused accounts to minimize security exposure.

参数

--mysql-auth-plugin _PLUGIN_
Set MySQL authorization plugin (caching_sha2_password or mysql_native_password). Used with create.
--acl _RULES_
Comma-separated Kafka ACL rules in topic:permission format. Used with create.
--opensearch-acl _RULES_
Comma-separated OpenSearch ACL rules in index:permission format. Used with create.
--format _COLUMNS_
Columns for output (e.g., Name,Role).
--no-header
Omit the header row from output.
--output _FORMAT_
Output format: text or json (default: text).

FAQ

What is the doctl-databases-user command used for?

doctl databases user manages users for DigitalOcean managed database clusters. Users represent authentication credentials that applications and administrators use to connect to databases. Each user has associated credentials (username and password) and potentially different privileges depending on the database engine. User management includes creating users for different applications or services, rotating credentials via password reset, and removing users when access is no longer needed. Proper user management follows security best practices: creating dedicated users for each application, regularly rotating credentials, and removing unused accounts to minimize security exposure.

How do I run a basic doctl-databases-user example?

Run `doctl databases user list [cluster_id]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --mysql-auth-plugin _PLUGIN_ do in doctl-databases-user?

Set MySQL authorization plugin (caching_sha2_password or mysql_native_password). Used with create.