> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Cloud SQL MySQL source for ELT & CDC

> How to configure Google Cloud SQL for MySQL as a CDC source in Integrate.io ELT & CDC, including read-replica setup and binary log configuration.

## Create Read-Replica (optional)

We recommend syncing data using a read-replica of your database to ensure sync doesn't affect your primary database instance. If you wish to sync against Primary, feel free to skip this step.Refer this [documentation](https://cloud.google.com/sql/docs/mysql/replication/create-replica) to create a read-replica

## Create user

Create a sync user for Integrate.io by executing,

```bash theme={null}
CREATE USER 'flydata'@'%' IDENTIFIED BY '<your_password>';
```

Grant necessary privileges,

```sql theme={null}
GRANT SELECT, RELOAD, REPLICATION SLAVE, REPLICATION CLIENT, LOCK TABLES ON *.* TO 'flydata'@'%';
FLUSH PRIVILEGES;
```

## Enable binary logging

<Steps>
  <Step>
    Select your database instance in CloudSQL on Google Cloud Platform
  </Step>

  <Step>
    Go to **Backup**
  </Step>

  <Step>
    Enable Automated Backups by clicking on **Edit** and selecting **Automate backups** and **Enable point-in-time recovery** options.

    <Frame>
      <img src="https://mintcdn.com/integrateio/SIDFEDRgXpxG0yrn/images/cdc/sources/image-75.png?fit=max&auto=format&n=SIDFEDRgXpxG0yrn&q=85&s=fe416882c2238f8d4fd3b58e8fa6e93b" alt="Google Cloud SQL backup settings with automated backups and point-in-time recovery enabled" width="840" height="620" data-path="images/cdc/sources/image-75.png" />
    </Frame>

    Confirm your changes by checking the binlog status,

    ```sql theme={null}
    SHOW GLOBAL VARIABLES LIKE 'log_bin';
    ```
  </Step>
</Steps>
