---
title: "Link a MySQL sync cluster to a dedicated server"
sidebar_label: "Link a cluster to a dedicated server"
sidebar_position: 17
description: "How to link a MySQL sync cluster to a dedicated server"
---

import Formbricks from '@theme/MDXComponents/Formbricks'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import MoreVerticalIcon from '@selectel/docux/icons/more-vertical'
import {TabItemLabel} from '@selectel/docux/components'
import CreateGlobalRouter from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/global-router/create-global-router.mdx'
import ConnectDedicatedNetworkToGlobalRouter from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/global-router/connect-dedicated-network-to-global-router.mdx'
import ConnectCloudNetworkToGlobalRouter from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/global-router/connect-cloud-network-to-global-router.mdx'
import ConfigureNetworkInterfaceOfPrivateNetwork from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/dedicated/configure-network-interface-of-private-network.mdx'
import WriteStaticRoutesDedicated from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/global-router/write-static-routes-dedicated.mdx'

# Link a MySQL sync cluster to a dedicated server

:::info

Some dedicated server configurations of the [Chipcore Line](/dedicated/order/dedicated-configurations.mdx#prebuilt-servers) cannot be added to a global router network because they lack a port for private network connection. You can check for a private network port in the [Control Panel](https://my.selectel.ru/servers/servers/) on the server page on the **Ports \*\*\*\* tab**.

:::

1. [Create a global router](#create-global-router).
2. [Connect the network and subnet to the global router up to the dedicated server VLAN](#connect-network-and-subnet-to-router-up-to-dedicated-server-vlan).
3. [Connect the network and subnet to the global router up to the cloud platform project](#connect-network-and-subnet-to-router-up-to-cloud-platform-project).
4. [Assign IP addresses from the created subnets to the dedicated server](#assign-ip-to-dedicated-server).
5. [Specify routes on the dedicated server](#write-routes-on-dedicated-server).
6. [Create a Managed Database cluster](#create-managed-database-cluster): new or from a backup of an existing Managed Database cluster.

See an [example of network organization](#example-of-network-organization-between-managed-database-and-dedicated-server) between a dedicated server and a Managed Database.

## Example of network organization between a Managed Database and a dedicated server \{#example-of-network-organization-between-managed-database-and-dedicated-server}

If you need to configure private connectivity between a dedicated server in the SPB-2 pool and a new Managed Database in the ru-2 pool:

1. Create a global router.
2. Connect two private subnets to the router — `192.168.0.0/29` with gateway `192.168.0.1` for the SPB-2 pool and `172.16.0.0/29` with gateway `172.16.0.1` for the ru-2 pool.
3. Assign an address from the `192.168.0.0/29` subnet to the dedicated server, for example, `192.168.0.2`.
4. Specify routes on the dedicated server in the SPB-2 pool — to subnet `172.16.0.0/29` via gateway `192.168.0.1`.
5. Create a new Managed Database cluster on subnet `172.16.0.0/29`.

![](https://423.selcdn.ru/kb/globalrouter-dbaas-create-network-database-to-dedicated-server-example-LANG-THEME.png)

## 1. Create a global router \{#create-global-router}

<CreateGlobalRouter />

## 2. Connect a network and subnet to the global router up to the dedicated server VLAN \{#connect-network-and-subnet-to-router-up-to-dedicated-server-vlan}

<ConnectDedicatedNetworkToGlobalRouter />

## 3. Connect a network and subnet to the global router up to the cloud platform project \{#connect-network-and-subnet-to-router-up-to-cloud-platform-project}

<ConnectCloudNetworkToGlobalRouter />

## 4. Assign an IP address to the dedicated server \{#assign-ip-to-dedicated-server}

Configure a local port on the dedicated server that is included in the global router network. Assign an IP address to the port from the private subnet that you [connected to the global router in step 2](#connect-network-and-subnet-to-router-up-to-dedicated-server-vlan).

<ConfigureNetworkInterfaceOfPrivateNetwork />

## 5. Specify a route on the dedicated server \{#write-routes-on-dedicated-server}

On the server, you must specify a static route to the cloud platform subnet that you [connected to the global router in step 3](#connect-network-and-subnet-to-router-up-to-cloud-platform-project).

<WriteStaticRoutesDedicated />

## 6. Create a Managed Database cluster \{#create-managed-database-cluster}

<Tabs queryString="create-managed-database-cluster">
  <TabItem value="new-cluster" default>
    <TabItemLabel>
      New
    </TabItemLabel>

    1. In the [Control Panel](https://my.selectel.ru/vpc/default/dbaas/), on the top menu, click **Products** and select **Managed Databases**.

    2. Click **Create cluster**.

    3. Enter the cluster name.

    4. Select a [location](/infrastructure/locations.mdx). You cannot change the location after creation.

    5. Select a DBMS — MySQL sync.

    6. Select a [MySQL sync version](/managed-databases/mysql-sync/configurations.mdx#versions). You cannot change the version after creation.

    7. Select a [configuration line](/managed-databases/mysql-sync/configurations.mdx#configuration-lines) and specify the number of vCPU, the amount of RAM, and the disk size.

       After creating the cluster, you can change the node configuration — [scale the cluster](/managed-databases/mysql-sync/resize-cluster.mdx).

    8. Optional: to configure [cluster fault tolerance](/managed-databases/mysql-sync/cluster-fault-tolerance.mdx), select the **Add 2 replicas** checkbox in the **Fault tolerance** block. The first node is the master node, and the rest are replicas. For a multi-node cluster, [SLA](https://files.selectel.ru/docs/ru/conditions-cloud-platform.pdf) applies — we guarantee 99.95% write availability and 99.99% read availability.

    9. Select the subnet that you [connected to the global router in step 3](#connect-network-and-subnet-to-router-up-to-cloud-platform-project).

       You can [restrict the list of addresses](/managed-databases/mysql-sync/network-access-control.mdx) from which access to the database cluster will be allowed.

    10. Optional: to change [DBMS settings](/managed-databases/mysql-sync/settings.mdx), click **Change**. We recommend changing settings only when necessary — incorrect values can reduce cluster performance.

    11. Check the cluster price.

    12. Click **Create cluster**. The cluster will be ready for use when it switches to the `ACTIVE` status.
  </TabItem>

  <TabItem value="cluster-from-backup">
    <TabItemLabel>
      From backup
    </TabItemLabel>

    1. In the [Control Panel](https://my.selectel.ru/vpc/default/dbaas/), on the top menu, click **Products** and select **Managed Databases**.

    2. Click **Create cluster**.

    3. Select the [location](/infrastructure/locations.mdx) where the existing Managed Database cluster is located.

    4. Select the **Restore cluster from backup** checkbox.

    5. Select an existing Managed Database cluster.

    6. Choose how to restore the cluster—from the last available backup or to a specific point in time within the last 7 days.

    7. Click **Continue**.

    8. Select a [configuration line](/managed-databases/mysql-sync/configurations.mdx#configuration-lines) and specify the number of vCPU, the amount of RAM, and the disk size.

       After creating the cluster, you can change the node configuration — [scale the cluster](/managed-databases/mysql-sync/resize-cluster.mdx).

    9. Optional: to configure cluster fault tolerance, select the **Add 2 replicas** checkbox in the **Fault tolerance** block. The first node is the master node, and the rest are replicas. For a multi-node cluster, [SLA](https://files.selectel.ru/docs/ru/conditions-cloud-platform.pdf) applies — we guarantee 99.95% write availability and 99.99% read availability.

    10. Select the subnet that you [connected to the global router in step 3](#connect-network-and-subnet-to-router-up-to-cloud-platform-project).

        You can [restrict the list of addresses](/managed-databases/mysql-sync/network-access-control.mdx) from which access to the database cluster will be allowed.

    11. Optional: to change [DBMS settings](/managed-databases/mysql-sync/settings.mdx), click **Change**. We recommend changing settings only when necessary — incorrect values can reduce cluster performance.

    12. Check the cluster price.

    13. Click **Create cluster**.

    14. After restoring the cluster, node addresses will change — update them in your application.
  </TabItem>
</Tabs>

<Formbricks />
