# doctl databases – DigitalOcean Documentation > The commands under `doctl databases` are for managing your MySQL, Redis, Valkey, PostgreSQL, MongoDB, Kafka and Opensearch database services. - [doctl databases backups](https://docs.digitalocean.com/reference/doctl/reference/databases/backups/index.html.md): Retrieves a list of backups created for the specified database cluster. The list contains the size in GB, and the date and time the backup was created. - [doctl databases connection](https://docs.digitalocean.com/reference/doctl/reference/databases/connection/index.html.md): Retrieves the following connection details for a database cluster: - A connection string for the database cluster - The default database name - The fully-qualified domain name of the publicly-connectable host - The port on which the database is listening … - [doctl databases create](https://docs.digitalocean.com/reference/doctl/reference/databases/create/index.html.md): Creates a database cluster with the specified name. You can customize the configuration using the listed flags, all of which are optional. Without any flags set, the command creates a single-node, single-CPU PostgreSQL database cluster. - [doctl databases delete](https://docs.digitalocean.com/reference/doctl/reference/databases/delete/index.html.md): Deletes the database cluster with the specified ID. To retrieve a list of your database clusters and their IDs, use `doctl databases list`. - [doctl databases fork](https://docs.digitalocean.com/reference/doctl/reference/databases/fork/index.html.md): Creates a new database cluster from an existing cluster. The forked database contains all of the data from the original database at the time the fork is created. - [doctl databases get](https://docs.digitalocean.com/reference/doctl/reference/databases/get/index.html.md): Retrieves the following details about the specified database cluster: - The database ID, in UUID format - The name you gave the database cluster - The database engine. Possible values: `redis`, `valkey`, `pg`, `mysql` , `mongodb`, `kafka`, `opensearch` - … - [doctl databases get-ca](https://docs.digitalocean.com/reference/doctl/reference/databases/get-ca/index.html.md): Retrieves a database certificate - [doctl databases list](https://docs.digitalocean.com/reference/doctl/reference/databases/list/index.html.md): Retrieves a list of database clusters and their following details: - The database ID, in UUID format - The name you gave the database cluster - The database engine. Possible values: `redis`, `valkey`, `pg`, `mysql` , `mongodb`, `kafka`, `opensearch` - The … - [doctl databases migrate](https://docs.digitalocean.com/reference/doctl/reference/databases/migrate/index.html.md): Migrates the specified database cluster to a new region. - [doctl databases resize](https://docs.digitalocean.com/reference/doctl/reference/databases/resize/index.html.md): Resizes the specified database cluster. You must specify the desired number of nodes and size of the nodes. For example: doctl databases resize ca9f591d-9999-5555-a0ef-1c02d1d1e352 --num-nodes 2 --size db-s-16vcpu-64gb Database nodes cannot be resized to … ## doctl databases configuration The subcommands of `doctl databases configuration` are used to view a database cluster's configuration. - [doctl databases configuration get](https://docs.digitalocean.com/reference/doctl/reference/databases/configuration/get/index.html.md): Retrieves the advanced configuration for the specified cluster, including its backup settings, temporary file limit, and session timeout values. - [doctl databases configuration update](https://docs.digitalocean.com/reference/doctl/reference/databases/configuration/update/index.html.md): Updates the specified database cluster's advanced configuration. Using this command, you can update various settings like backup times, temporary file limits, and session timeouts. Available settings vary by database engine. This command functions as a … ## doctl databases db The subcommands under `doctl databases db` are for managing specific databases that are served by a database cluster. You can get a list of existing database clusters and their IDs by calling: doctl databases list - [doctl databases db create](https://docs.digitalocean.com/reference/doctl/reference/databases/db/create/index.html.md): Creates a database with the specified name in the specified database cluster. You can get a list of existing database clusters and their IDs by calling: doctl databases list - [doctl databases db delete](https://docs.digitalocean.com/reference/doctl/reference/databases/db/delete/index.html.md): Deletes the specified database from the specified database cluster. You can get a list of existing database clusters and their IDs by calling: doctl databases list You can get a list of existing databases that are hosted within a cluster by calling: doctl … - [doctl databases db get](https://docs.digitalocean.com/reference/doctl/reference/databases/db/get/index.html.md): Retrieves the name of the specified database hosted in the specified database cluster. You can get a list of existing database clusters and their IDs by calling: doctl databases list You can get a list of existing databases that are hosted within a cluster … - [doctl databases db list](https://docs.digitalocean.com/reference/doctl/reference/databases/db/list/index.html.md): Retrieves a list of databases being hosted in the specified database cluster. You can get a list of existing database clusters and their IDs by calling: doctl databases list ## doctl databases events The subcommands under `doctl databases events` are for listing database cluster events. You can get a list of database events by calling: doctl databases events list - [doctl databases events list](https://docs.digitalocean.com/reference/doctl/reference/databases/events/list/index.html.md): Retrieves a list of database clusters events: You can get a list of database events by calling: doctl databases events list ## doctl databases firewalls The subcommands under `doctl databases firewalls` enable the management of firewalls for database clusters. - [doctl databases firewalls append](https://docs.digitalocean.com/reference/doctl/reference/databases/firewalls/append/index.html.md): Appends a single rule to the existing firewall rules of the specified database. This command requires the `--rule` flag specifying the resource or resources allowed to access the database cluster. The rule passed to the `--rule` flag must be in a : format … - [doctl databases firewalls list](https://docs.digitalocean.com/reference/doctl/reference/databases/firewalls/list/index.html.md): This command lists the following details for each firewall rule in a given database: - The UUID of the firewall rule - The UUID of the cluster for which the rule is applied - The type of resource that the firewall rule allows to access the database … - [doctl databases firewalls remove](https://docs.digitalocean.com/reference/doctl/reference/databases/firewalls/remove/index.html.md): Removes single rule from the list of firewall rules for a specified database. You can retrieve a firewall rule's UUIDs by calling: doctl database firewalls list - [doctl databases firewalls replace](https://docs.digitalocean.com/reference/doctl/reference/databases/firewalls/replace/index.html.md): Replace the firewall rules for a specified database. This command requires the `--rule` flag. You can configure multiple rules for the firewall by passing additional arguments in a comma-separated list with the `--rule` flag. Each rule passed using the … ## doctl databases indexes The subcommands under `doctl databases indexes` enable the management of indexes for opensearch clusters - [doctl databases indexes delete](https://docs.digitalocean.com/reference/doctl/reference/databases/indexes/delete/index.html.md): Usage doctl databases indexes delete [flags] Aliases rm Flags Option Description --force, -f Deletes the opensearch index without a confirmation promptDefault: false --help, -h Help for this command Related Commands Command Description doctl databases … - [doctl databases indexes list](https://docs.digitalocean.com/reference/doctl/reference/databases/indexes/list/index.html.md): This command lists the following details for each index in an opensearch cluster: - The Name of the index. - The Status of the index. - The Health of the index. - The Number of Shards in the index. - The Number of Replicas in the index. - The Number of … ## doctl databases maintenance-window The `doctl databases maintenance-window` commands allow you to schedule, and check the schedule of, maintenance windows for your databases. Maintenance windows are hour-long blocks of time during which DigitalOcean performs automatic maintenance on databases every week. During this time, health checks, security updates, version upgrades, and more are performed. To install an update outside of a maintenance window, use the `doctl databases maintenance-window install` command. - [doctl databases maintenance-window get](https://docs.digitalocean.com/reference/doctl/reference/databases/maintenance-window/get/index.html.md): Retrieves the following information on currently-scheduled maintenance windows for the specified database cluster: - The day of the week the maintenance window occurs - The hour in UTC when maintenance updates will be applied, in 24 hour format, such as … - [doctl databases maintenance-window install](https://docs.digitalocean.com/reference/doctl/reference/databases/maintenance-window/install/index.html.md): Starts the installation of updates for the specified database cluster immediately outside of a maintenance window. - [doctl databases maintenance-window update](https://docs.digitalocean.com/reference/doctl/reference/databases/maintenance-window/update/index.html.md): Updates the maintenance window for the specified database cluster. Maintenance windows are hour-long blocks of time during which DigitalOcean performs automatic maintenance on databases every week. During this time, health checks, security updates, version … ## doctl databases options The subcommands under `doctl databases options` retrieve configuration options for databases, such as available engines, engine versions and their equivalent slugs. - [doctl databases options engines](https://docs.digitalocean.com/reference/doctl/reference/databases/options/engines/index.html.md): Lists the available database engines for DigitalOcean Managed Databases. - [doctl databases options regions](https://docs.digitalocean.com/reference/doctl/reference/databases/options/regions/index.html.md): Lists the available regions for a given database engine. Some engines may not be available in certain regions. - [doctl databases options slugs](https://docs.digitalocean.com/reference/doctl/reference/databases/options/slugs/index.html.md): Lists the available slugs for a given database engine. - [doctl databases options versions](https://docs.digitalocean.com/reference/doctl/reference/databases/options/versions/index.html.md): Lists the available versions for a given database engine. ## doctl databases pool The subcommands under `doctl databases pool` manage connection pools for your database cluster. A connection pool may be useful if your database: - Typically handles a large number of idle connections - Has wide variability in the possible number of connections at any given time - Drops connections due to max connection limits - Experiences performance issues due to high CPU usage - [doctl databases pool create](https://docs.digitalocean.com/reference/doctl/reference/databases/pool/create/index.html.md): Creates a connection pool for the specified database cluster. In addition to the pool's name, you must also use flags to specify the pool's target database, its size, and a database user that the pool uses to authenticate. If you do not specify a user, the … - [doctl databases pool delete](https://docs.digitalocean.com/reference/doctl/reference/databases/pool/delete/index.html.md): Deletes the specified connection pool for the specified database cluster. You can get a list of existing connection pools by calling: doctl databases pool list You can get a list of existing database clusters and their IDs by calling: doctl databases list - [doctl databases pool get](https://docs.digitalocean.com/reference/doctl/reference/databases/pool/get/index.html.md): This command retrieves the following information about the specified connection pool for the specified database cluster: - The database user that the connection pool uses. When excluded, all connections to the database use the inbound user. - The … - [doctl databases pool list](https://docs.digitalocean.com/reference/doctl/reference/databases/pool/list/index.html.md): Lists the existing connection pools for the specified database. The command returns the following details about each connection pool: - The database user that the connection pool uses. When excluded, all connections to the database use the inbound user. - … - [doctl databases pool update](https://docs.digitalocean.com/reference/doctl/reference/databases/pool/update/index.html.md): Updates the specified connection pool for the specified database cluster. You can get a list of existing connection pools by calling: doctl databases pool list You can get a list of existing database clusters and their IDs by calling: doctl databases list ## doctl databases replica The subcommands under `doctl databases replica` allow you to manage read-only replicas associated with a database cluster. In addition to primary nodes in a database cluster, you can create up to 2 read-only replica nodes (also referred to as "standby nodes") to maintain high availability. - [doctl databases replica connection](https://docs.digitalocean.com/reference/doctl/reference/databases/replica/connection/index.html.md): Retrieves information for connecting to the specified read-only database replica in the specified database cluster This command requires that you pass in the replica's name, which you can retrieve by querying a database ID: doctl databases replica list … - [doctl databases replica create](https://docs.digitalocean.com/reference/doctl/reference/databases/replica/create/index.html.md): Creates a read-only database replica for the specified database cluster, giving it the specified name. This command requires the ID of a database cluster, which you can retrieve by calling: doctl databases list - [doctl databases replica delete](https://docs.digitalocean.com/reference/doctl/reference/databases/replica/delete/index.html.md): Deletes the specified read-only replica for the specified database cluster. This command requires that you pass in the replica's name, which you can retrieve by querying a database ID: doctl databases replica list This command requires the ID of a database … - [doctl databases replica get](https://docs.digitalocean.com/reference/doctl/reference/databases/replica/get/index.html.md): Gets the following details for the specified read-only replica of the specified database cluster: - The name of the replica - The information required to connect to the read-only replica - The region where the database cluster is located, such as `nyc3` or … - [doctl databases replica list](https://docs.digitalocean.com/reference/doctl/reference/databases/replica/list/index.html.md): Lists the following details for read-only replicas for the specified database cluster. - The replica's name - The region where the database cluster is located, such as `nyc3`, `sfo2` - The replica's status. Possible values: `forking` and `active` This … - [doctl databases replica promote](https://docs.digitalocean.com/reference/doctl/reference/databases/replica/promote/index.html.md): Promotes a read-only database replica to become its own independent primary cluster. Promoted replicas no longer stay in sync with primary cluster they were forked from. This command requires that you pass in the replica's name, which you can retrieve by … ## doctl databases sql-mode The subcommands of `doctl databases sql-mode` are used to view and configure a MySQL database cluster's global SQL modes. Global SQL modes affect the SQL syntax MySQL supports and the data validation checks it performs. - [doctl databases sql-mode get](https://docs.digitalocean.com/reference/doctl/reference/databases/sql-mode/get/index.html.md): Displays the configured SQL modes for the specified MySQL database cluster. - [doctl databases sql-mode set](https://docs.digitalocean.com/reference/doctl/reference/databases/sql-mode/set/index.html.md): This command configures the SQL modes for the specified MySQL database cluster. The SQL modes should be provided as a space separated list. This command replaces the existing SQL mode configuration completely. Include all of the current values when adding … ## doctl databases topics The subcommands under `doctl databases topics` enable the management of topics for kafka database clusters - [doctl databases topics create](https://docs.digitalocean.com/reference/doctl/reference/databases/topics/create/index.html.md): This command creates a kafka topic for the specified kafka database cluster, giving it the specified name. Example: doctl databases topics create --replication_factor 2 --partition_count 4 - [doctl databases topics delete](https://docs.digitalocean.com/reference/doctl/reference/databases/topics/delete/index.html.md): Usage doctl databases topics delete [flags] Aliases rm Flags Option Description --force, -f Deletes the kafka topic without a confirmation promptDefault: false --help, -h Help for this command Related Commands Command Description doctl databases topics … - [doctl databases topics get](https://docs.digitalocean.com/reference/doctl/reference/databases/topics/get/index.html.md): This command lists the following details for a given topic in a kafka database cluster: - The Name of the topic. - The Partitions of the topic - the number of partitions in the topics - The Replication Factor of the topic - number of brokers the topic's … - [doctl databases topics list](https://docs.digitalocean.com/reference/doctl/reference/databases/topics/list/index.html.md): This command lists the following details for each topic in a kafka database cluster: - The Name of the topic. - The State of the topic. - The Replication Factor of the topic - number of brokers the topic's partitions are replicated across. - [doctl databases topics partitions](https://docs.digitalocean.com/reference/doctl/reference/databases/topics/partitions/index.html.md): This command lists the following details for each partition of a given topic in a kafka database cluster: - The Id - identifier of the topic partition. - The Size - size of the topic partition, in bytes. - The InSyncReplicas - number of brokers that are in … - [doctl databases topics update](https://docs.digitalocean.com/reference/doctl/reference/databases/topics/update/index.html.md): This command updates a kafka topic for the specified kafka database cluster. Example: doctl databases topics update ## doctl databases user The commands under `doctl databases user` allow you to view details for, and create, database users. Database user accounts are scoped to one database cluster, to which they have full admin access, and are given an automatically-generated password. - [doctl databases user create](https://docs.digitalocean.com/reference/doctl/reference/databases/user/create/index.html.md): Creates a new user for a database. New users are given a role of `normal` and are given an automatically-generated password. To retrieve a list of your databases and their IDs, call `doctl databases list`. - [doctl databases user delete](https://docs.digitalocean.com/reference/doctl/reference/databases/user/delete/index.html.md): Deletes the specified database user. To retrieve a list of your databases and their IDs, call `doctl databases list`. - [doctl databases user get](https://docs.digitalocean.com/reference/doctl/reference/databases/user/get/index.html.md): Retrieves the following details about the specified user: - The username for the user - The password for the user - The user's role, either "primary" or "normal" Primary user accounts are created by DigitalOcean at database cluster creation time and can't … - [doctl databases user list](https://docs.digitalocean.com/reference/doctl/reference/databases/user/list/index.html.md): Retrieves a list of users for the specified database with the following details: - The username for the user - The password for the user - The user's role, either "primary" or "normal" Primary user accounts are created by DigitalOcean at database cluster … - [doctl databases user reset](https://docs.digitalocean.com/reference/doctl/reference/databases/user/reset/index.html.md): Resets the auth password or the MySQL authorization plugin for a given user and returns the user's new credentials. When resetting MySQL auth, valid values for `` are `caching_sha2_password` and `mysql_native_password`.