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

# MySQL

<Note>
  You need to make sure the Less IPs are whitelisted from your MySQL database. You can find the IPs [here](/guides/less-ip).

  You need to have a user account with write access to the database to be able to use the MySQL destination.
</Note>

### Setup

For most MySQL databases, you can use the default connection method. However, if you are using a database that requires SSH, you can use the SSH connection method.

<Tip>
  Most MySQL databases are supported.
</Tip>

To connect to a MySQL database, the easiest is to find your connection string. This is usually found in the database's settings (alternatively, ask your database admin for a connection string). It looks something like this:

```
mysql://myuser:mypassword123@db.example.com:3306/company_db
```

Which maps to the following:

```
mysql://<username>:<password>@<host>:<port>/<database>
```

Save those values for the steps below.

<Steps>
  <Step title="Account">
    The first step is input **host**, **port** (almost always 3306), and the name of the **database** you want to extract data from.
  </Step>

  <Step title="Credentials">
    Input your **username** and **password** from the connection string you found above.
  </Step>

  <Step title="SSH">
    We recommend trying without SSH first if you're in doubt. If you are using a database that requires SSH, you can use the SSH connection method.

    Input your **SSH host**, **SSH port**, **SSH username**, and **SSH password** from the database's settings.

    You can also choose to use a private key instead of a password. Just check the "I want to use an SSH Key" checkbox and upload your private key file.
  </Step>

  <Step title="Test Connection">
    Once you have input your account and credential information, you need to validate your connection. Click "Test Connection" to confirm that we can connect to the database. Note that we **do not** change error message coming from the database.
  </Step>
</Steps>
