[Yandex Cloud documentation](../../index.md) > [Yandex Managed Service for MySQL®](../index.md) > [Step-by-step guides](index.md) > Logs and monitoring > Connecting from DataLens

# Connecting to a MySQL® cluster from DataLens

[Yandex DataLens](../../datalens/concepts/index.md) is a business intelligence service, that lets you upload, process and visualize data for analysing and testing hypotheses. It can help you make marketing decisions for your product.

To use an existing cluster as a data source for Yandex DataLens:
1. [Activate DataLens](#activate-datalens).
1. [Allow access to the cluster from DataLens](#allow-access).
1. [Create a cluster connection in DataLens](#create-connector).

## Activating DataLens {#activate-datalens}

{% note alert "Limit" %}

You can only create one DataLens instance in the cloud.

{% endnote %}

{% list tabs group=instructions %}

- Management console {#console}

    1. In the [management console](https://console.yandex.cloud), navigate to the folder page.
    1. Navigate to **DataLens**.
    1. Click **Activate DataLens**.

{% endlist %}

The DataLens instance will be activated in the selected folder.

## Allowing access to a cluster from DataLens {#allow-access}

To allow DataLens to connect to your cluster and work with its data, enable **DataLens access** when [creating](cluster-create.md) or [reconfiguring](update.md#change-additional-settings) the cluster.

## Creating a cluster connection {#create-connector}

{% list tabs group=instructions %}

- Management console {#console}

  1. Make sure DataLens is [activated](#activate-datalens) in the relevant folder and has [permission](#allow-access) to access the cluster.
  1. Navigate to **Managed Service for&nbsp;MySQL**.
  1. Click the name of your cluster and select the **DataLens** tab.
  1. Click **Create connection**.

     {% cut "I have no **Create connection** button" %}

     If you see a message saying _DataLens not activated_ instead of the **Create connection** button, it means that you either have not activated DataLens yet or have activated it in a different folder. To connect your cluster to a DataLens instance from another folder, follow [this DataLens guide](../../datalens/operations/connection/create-mysql.md).

     {% endcut %}

  1. [Set up your connection](#connector-settings).
  1. In the top-right corner, select the connection scope from the drop-down list:
     * Available only to me.
     * Available to the company.
  1. Check that the settings are correct by clicking **Check connection**.
  1. After a successful check, click **Create connection**.
  1. Specify a name for the connection.
  1. Click **Create**.

{% endlist %}

After creating the connection, you can:
* [Update](#update-connector) or [delete](#delete-connector) this connection.
* Use this connection to [create datasets](../../datalens/dataset/index.md) from the cluster data.
* Visualize the datasets using [charts](../../datalens/concepts/chart/index.md) and [dashboards](../../datalens/concepts/dashboard.md).

## Viewing a list of cluster connections {#connectors-list}

{% list tabs group=instructions %}

- Management console {#console}

  1. Navigate to **Managed Service for&nbsp;MySQL**.
  1. Click the name of your cluster and select the **DataLens** tab.

{% endlist %}

## Updating a cluster connection {#update-connector}

{% list tabs group=instructions %}

- Management console {#console}

  1. Navigate to **Managed Service for&nbsp;MySQL**.
  1. Click the name of your cluster and select the **DataLens** tab.
  1. Select the connection from the list.
  1. Edit the connection [settings](#connector-settings) and scope as needed.
  1. Check that the settings are correct by clicking **Check connection**.
  1. After successfully checking the connection, click **Save**.

{% endlist %}

## Deleting a cluster connection {#delete-connector}

{% list tabs group=instructions %}

- Management console {#console}

  1. Navigate to **Managed Service for MySQL**.
  1. Click the name of your cluster and open the **DataLens** tab.
  1. Select the connection from the list.
  1. Click ![image](../../_assets/console-icons/ellipsis.svg) at the top of the page and select **Delete**.
  1. In the window that opens, click **Delete**.

{% endlist %}

## Connection settings {#connector-settings}

{% list tabs group=instructions %}

- Management console {#console}

  If your cluster and DataLens are in the same folder:
  1. Open the **Select in folder** tab.
  1. Select the cluster and its host from the drop-down lists or [create a new cluster](cluster-create.md) in the folder with DataLens by clicking **Create new**.
  1. Select the database and user from the drop-down lists.
  1. Enter the user password. See also [Creating a connection to MySQL® in Yandex DataLens](../../datalens/operations/connection/create-mysql.md) and [Configuring access](../../datalens/dataset/create-dataset.md#access) in the DataLens documentation.

  If your cluster and DataLens are in different folders:
  1. Navigate to the **Specify manually** tab.
  1. Use the settings from [this DataLens guide](../../datalens/operations/connection/create-mysql.md).

{% endlist %}