Create a MySQL sync cluster
Create a cluster
Control panel
Terraform
In the control panel, go to Cloud Platform → Databases.
Click Create Cluster.
Enter the name of the cluster.
Select a region.
Select a pool. Once created, the pool cannot be changed.
Select a DBMS —
Select
Select a line of configurations and specify the number of vCPUs, RAM size, and disk size.
Once the cluster has been created, you can change the configuration of the nodes —
Optional: to configure cluster fault tolerance, specify the number of nodes in the cluster in the Fault Tolerance block. The first node is the master node, the rest are replicas. SLA for a multi-node cluster — we guarantee 99.95% write availability and 99.99% read availability.
Select or create a subnet:
private subnet — a subnet without access from the Internet. You can connect a static public IP address;
or public subnet — all addresses on a public subnet are accessible from the Internet.
Addresses are assigned to each node in the cluster. Make sure that the number of addresses in the subnet is not less than the number of nodes in the cluster. If you plan to increase the number of replicas after the cluster is created, select a subnet that has a supply of free addresses. Once the cluster is created, the subnet cannot be changed.
You can restrict the list of addresses from which access to the database cluster will be allowed.
Optional: In a private subnet, you can connect a public IP address to a cluster node:
- If you selected an existing private subnet — check the Public access to cluster nodes checkbox and then the checkbox of the node to which you want to grant public access. The private subnet must meet the requirements;
- if you are creating a new private subnet — connect the public IP address after the cluster is created.
Optional: To change the DBMS settings, click Change. We recommend that you change the settings only when necessary — incorrectly selected values may reduce cluster performance.
Check the price of the cluster.
Click Create Cluster. The cluster will be ready for operation when it enters
the ACTIVE
status.
Use the Create cluster MySQL sync instruction in the Terraform documentation.
Create a database
Once you have created the database, you can grant users access to it.
- In the Control panel, on the top menu, click Products and select Cloud Databases.
- Open the Active tab.
- Open the cluster page → Database tab.
- Click Create Database.
- Enter the name of the database.
- Click Create.