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

# MySQL

> Connecting Fabi.ai to your [MySQL](https://www.mysql.com/) instance.

<Warning>
  Before connecting, ensure that you whitelist Fabi.ai's IP addresses in your firewall or security group settings:

  * `3.232.60.87`
  * `54.172.255.171`
</Warning>

# Creating a service account user

## 1. Log in to MySQL

Log in to your MySQL server as a user with administrative privileges:

```bash theme={null}
mysql -u root -p
```

Enter the password when prompted.

## 2. Create the service account user

```sql theme={null}
CREATE USER 'service_account'@'localhost' IDENTIFIED BY 'secure_password';
```

* Replace `service_account` with your desired username.
* Replace `secure_password` with a strong password.

## 3. Grant privileges

Fabi.ai needs read access to the schemas you wish to query.

```sql theme={null}
GRANT SELECT ON database_name.* TO 'service_account'@'localhost';
```

## 4. Apply changes

Run the following command to ensure the privileges are applied:

```sql theme={null}
FLUSH PRIVILEGES;
```

# Connecting MySQL to Fabi.ai

Once you've generated your service user credentials, follow the steps in [Connecting to Your Data](/getting_started/connect_data_sources)
<Tip>For information about our industry-leading security practices, check out our [Security hub](https://www.fabi.ai/security).</Tip>
