Database management
Viewing the list of databases
- In the management console, select the folder to get a list of databases for.
- In the list of services, select Yandex Database.
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To get a list of databases in the default folder, run the command:
$ yc ydb database list
Creating a database
You can create a database in a Serverless configuration or with Dedicated servers in each availability zone. For more information about the differences in configurations, see Overview.
To create a database:
-
In the management console, select a folder to create your database in.
-
In the list of services, select Yandex Database.
-
Click Create database.
-
Enter a name for the database. Naming requirements:
- The name must be unique within the folder.
- The name may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter. The last character can't be a hyphen.
- The maximum length of the name is 63 characters.
-
Under Database type, select the Serverless option.
-
Click Create database.
-
Wait until the database starts. When a database is being created, it has the
Provisioning
status. When it is ready for use, the status changes toRunning
.
-
In the management console, select a folder to create your database in.
-
In the list of services, select Yandex Database.
-
Click Create database.
-
Enter a name for the database. Naming requirements:
- The name must be unique within the folder.
- The name may contain lowercase Latin letters, numbers, and hyphens.
- The first character must be a letter. The last character can't be a hyphen.
- The maximum length of the name is 63 characters.
-
Under Computing resources, select the type and amount of computing resources.
-
Under Storage groups, select the disk type and number of storage groups that determines the total amount of storage.
-
Under Network, select a network and allow assigning public IP addresses to DB nodes.
If you plan to send DB requests both from the Yandex.Cloud network and the internet, select the Assign option next to the Public IP addresses field.
Warning
The consumption of outgoing internet traffic for YDB databases with external IPs is accounted for based on the current pricing policy.
Amounts charged for outgoing internet traffic resulting from the use of YDB will be compensated with grants.
Select an existing network from the Cloud network list.
If there is no network, create one:
- Click Create new.
- In the window that opens, enter a name for the new network and select the Create subnets option if no subnets were created. Subnets are created for each availability zone.
- Click Create.
-
Click Create database.
-
Wait until the database starts. When a database is being created, it has the
Provisioning
status. When it is ready for use, the status changes toRunning
.
Updating database settings
Warning
You can only update settings for databases running in the dedicated server configuration.
- In the management console, select the folder where you want to update DB settings.
- In the list of services, select Yandex Database.
- Click in the line with the desired DB and select Change.
- Configure the DB settings:
- Under Computing resources, select the type and amount of computing resources.
- Under Storage groups, select the disk type and number of storage groups that determines the total amount of storage.
- Click Edit database.
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To update DB settings:
-
View a description of the CLI's update DB parameter command:
$ yc ydb database update --help
-
Run a command like:
$ yc ydb database update <DB name> \ --new-name <new DB name> \ --description <new DB description> \ --resource-preset <class ID> \ --storage groups=<number of storage groups> ...
Deleting a database
- In the management console, select the folder to delete the DB from.
- In the list of services, select Yandex Database.
- Click in the line with the desired DB and select Delete.
- Confirm the deletion.
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To delete a database, run the command:
$ yc ydb database delete <DB name>