> ## 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 Troubleshoot your MySQL Connection?

> A comprehensive guide to diagnosing and resolving common MySQL connection issues with Superjoin.

Encountering connection issues with MySQL databases can be frustrating. This section provides a detailed explanation and resolution steps for common error messages.

<AccordionGroup>
  <Accordion title="Network Connection Refused" defaultOpen="true">
    <h4> Error Message: Unable to connect to the database, Please make sure that your database is running and that you have whitelisted all three of our IP addresses (3.6.225.10, 13.205.69.7, 13.204.201.25). </h4>

    <iframe width="560" height="415" src="https://www.youtube.com/embed/te4KTGF3V3M?si=dtw60HckBoVD7bkX" 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" }} />

    ### Action Steps

    <Steps>
      <Step title="Provide the IP">Ensure your MySQL server is running by trying to connect via a tool like MySQL Workbench or through the command line.</Step>
      <Step title="IP Whitelisting">Whitelist the IP addresses (3.6.225.10, 13.205.69.7, 13.204.201.25) in your MySQL settings, which might involve modifying firewall settings or MySQL user privileges. </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="Access Denied" defaultOpen="true">
    <h4> Error Message: Unable to connect to the database, Please ensure the database credentials are correct. </h4>

    <iframe width="560" height="415" src="https://www.youtube.com/embed/psp3_1s8aIA?si=THXPZhEiJQKbPiJt" 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" }} />

    ### Action Steps

    <Steps>
      <Step title="Verify">Verify that the username and password in your connection settings match the credentials in your MySQL server.</Step>
      <Step title="Reset password">If necessary, reset the password for the user in MySQL and update it in your connection settings.</Step>
      <Step title="Create a new username/password">Alternatively, it's best to create a new username/password. Create user like this `CREATE USER 'sammy'@'*' IDENTIFIED BY 'password';` and grant permission to databases like this `GRANT PRIVILEGE ON database.table TO 'username'@'host';` </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="Bad Database Error" defaultOpen="true">
    <h4>Error Message: Unable to connect to the database, Please make sure that the database exists.</h4>

    <Steps>
      <Step title="Verify db name">Ensure that the database name in your connection settings matches an actual database in your MySQL server. Here's the command: `SHOW DATABASES;` </Step>
      <Step title="Create DB">If the database does not exist, create it using a tool like MySQL Workbench or by executing a CREATE DATABASE SQL command.</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="Connection Timeout" defaultOpen="true">
    <h4> Error Message: Unable to connect to the database, Please make sure that your database is running and that you have whitelisted all three of our IP address (3.6.225.10, 13.205.69.7, 13.204.201.25). </h4>

    <iframe width="560" height="415" src="https://www.youtube.com/embed/kd_lba44ZmY?si=AcXvvO96n-5uZPAW" 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" }} />

    ### Action Steps

    <Steps>
      <Step title="Verify liveness">Check if the MySQL server is operational and not experiencing downtime.</Step>
      <Step title="Whitelist IP">Whitelist the IP addresses (3.6.225.10, 13.205.69.7, 13.204.201.25) in your MySQL settings, which might involve modifying firewall settings or MySQL user privileges.</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>

## Summarising all the errors that you could face while connecting to your MySQL DB

<Frame>
  <img src="https://mintcdn.com/superjoin/95T8cmea616drJuC/images/mysql/mysql-errors-chart.webp?fit=max&auto=format&n=95T8cmea616drJuC&q=85&s=ea9ce8c59dc140214ca14144cfc2e14e" width="2262" height="1238" data-path="images/mysql/mysql-errors-chart.webp" />
</Frame>
