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

# How to Whitelist an IP Address in MySQL Server?

> A guide to whitelist Superjoin's IP address in your MySQL server to connect MySQL to Google Sheets using Superjoin.

<Note>
  Superjoin’s IP Addresses are 3.6.225.10, 13.205.69.7 and 13.204.201.25. Whitelist all three of these IP Addresses in your database and allow TCP/IP connection from this IP in your
  firewall.
</Note>

## What is "Whitelisting"?

Think of your database like a private party. The "whitelist" is your guest list. Only the IP addresses (unique identifiers for computers on the internet) on this list can "enter the party," i.e., connect to your database. IPs not on the list will receive the metaphorical "you're not on the list" and cannot connect.

## Step by Step Guide to IP Whitelisting in your MySQL DB

<AccordionGroup>
  <Accordion title="#1 Speak to your IT Admin">
    If you're not hands-on with database management, contacting your IT admin is the best approach

    <Steps>
      <Step title="Provide the IP">Share Superjoin's IP addresses (3.6.225.10, 13.205.69.7, 13.204.201.25) with your admin.</Step>
      <Step title="Request Whitelisting">Ask them to whitelist this IP for your database access.</Step>
      <Step title="Test the Connection">Once whitelisted, connect your database in your Superjoin account to confirm everything is set up correctly.</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="#2 Whitelist it yourself" defaultOpen="true">
    If you're ready to handle this yourself, here’s how you can whitelist IP addresses for MySQL.

    <iframe width="560" height="415" src="https://www.youtube.com/embed/-EVGru4BQ8E?si=kdpSDKckeQG28JuC" title="Error: Connection Refused - While connecting MySQL/PostgreSQL to Google Sheet" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen style={{ width: "100%", borderRadius: "0.5rem" }} />

    ## Solution

    <Steps>
      <Step title="Log Into Your Server">Use SSH to access your server where MySQL is hosted.</Step>
      <Step title="Edit Config (1/3)">Open the configuration file (`/etc/mysql/my.cnf` or similar) using a text editor.</Step>
      <Step title="Edit Config (2/3)">Locate the `bind-address` directive and change its value to `0.0.0.0` to allow connections from any IP (be cautious with this setting).</Step>
      <Step title="Edit Config (3/3)">Ensure `skip-networking=0` is set under `[mysqld]`. Save and exit.</Step>
      <Step title="Restart MySQL">Use `sudo service mysql restart` to apply changes</Step>

      <Step title="Grant Access to Superjoin">
        Log into MySQL with `mysql -u root -p`. & Run the Command `GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_username'@'our_ip_address' IDENTIFIED BY 'your_password'; FLUSH PRIVILEGES;`
        <Note> Replace placeholders with your actual database name, username, and password. You must run this once for each of our three IP addresses - 3.6.225.10, 13.205.69.7 and 13.204.201.25</Note>
      </Step>

      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>

  <Accordion title="#3 Whitelist in Google Cloud (Cloud SQL)" defaultOpen="true">
    <Steps>
      <Step title="Navigate to Google Cloud Console">Go to the SQL section and select your instance.</Step>
      <Step title="Authorize Networks">Edit settings and under Authorized Networks, add Superjoin's IP Adresses (3.6.225.10, 13.205.69.7, 13.204.201.25). Save your changes.</Step>
      <Step title="Reach Out for Support">If you've tried the above steps and still facing issues, don't hesitate to contact us at [support@superjoin.ai](mailto:support@superjoin.ai). We will respond immediately.</Step>
    </Steps>
  </Accordion>
</AccordionGroup>

## AWS Whitelisting

<CardGroup cols={1}>
  <Card title="Looking to whitelist in AWS?" icon="life-ring" iconType="duotone" href="../rds/ip-whitelisting">
    Head over to the IP Whitelisting in AWS page to get a step by step troubleshooting guide.
  </Card>
</CardGroup>

<Info>
  Whitelisting an IP for your MySQL, Amazon Redshift, or PostgreSQL database doesn't just bolster security—it ensures that only authorized
  locations can access your data. Whether you choose to manage this process yourself or coordinate with IT professionals, ensuring your
  database's security is crucial. Remember, if you're ever unsure, consulting with an expert is always a wise decision. Happy data managing!
</Info>
