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

# Setup MySQL

> Learn how to securely connect Julius to your MySQL database to analyze your data directly without uploading files.

<div style={{ display: "flex", justifyContent: "center" }}>
  <iframe width="560" height="315" src="https://www.youtube.com/embed/G64s6MYk7hE?si=-ooIiCBSu0LpHiup" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
</div>

## Getting Started

Julius connects directly to your MySQL database, allowing you to analyze your data using natural language; no SQL knowledge required.

<Steps>
  <Step title="Create New Data Connector" icon="plus">
    Navigate to the **Data Connectors** page and click **"Create new Data Connector"**, then select **MySQL**.
  </Step>
</Steps>

***

## Connection Setup

### Required Fields

<Note>
  All fields marked with an asterisk (\*) are required.
</Note>

<ParamField path="Connection Name" type="string" required>
  A friendly name to identify this connection in Julius.

  **Example:** "Production DB" or "Sales Database"
</ParamField>

<ParamField path="Host" type="string" required>
  The server address where your MySQL database is hosted.

  **Format:** IP address (`192.168.1.100`) or domain (`db.mycompany.com`)

  **Cloud databases:** Provided by AWS RDS, Google Cloud SQL, etc.
</ParamField>

<ParamField path="Port" type="number" required>
  The network port for MySQL connections.

  **Default:** `3306`

  **Note:** Only change if using a custom port
</ParamField>

<ParamField path="Database" type="string" required>
  The specific database name to analyze.

  **Example:** `sales_data`, `customers`, `analytics`
</ParamField>

<ParamField path="User" type="string" required>
  Your MySQL database username with read permissions.

  <Tip>Create a dedicated read-only user for Julius</Tip>
</ParamField>

<ParamField path="Password" type="string" required>
  Password for your MySQL user account.

  **Security:** Encrypted in transit and at rest
</ParamField>

***

## Network Configuration

<Steps>
  <Step title="Test Your Connection" icon="plug">
    1. Click **"Add Connection"** to test your configuration
    2. Julius validates your credentials and network access
    3. If successful, your connector is ready to use!

    <Accordion title="Connection failed? Here's what to check">
      * ✓ Host and port are correct
      * ✓ Database allows external connections
      * ✓ Username and password are accurate
      * ✓ User has permissions for the specified database
    </Accordion>
  </Step>
</Steps>

***

## Start Analyzing Your Data

Once connected, simply ask Julius about your data in plain English:

<CardGroup cols={2}>
  <Card title="Query Data" icon="magnifying-glass">
    "Show me all customers from the users table"
  </Card>

  <Card title="Calculate Metrics" icon="calculator">
    "What's the average order value this month?"
  </Card>

  <Card title="Create Visualizations" icon="chart-line">
    "Create a chart of sales by region"
  </Card>

  <Card title="Analyze Trends" icon="chart-mixed">
    "How has revenue changed over the past 6 months?"
  </Card>
</CardGroup>

<Tip>
  **No SQL required!** Julius automatically writes and executes queries based on your natural language requests.
</Tip>

***

## Security & Compliance

<CardGroup cols={3}>
  <Card title="SOC 2 Type 2" icon="certificate">
    Certified to meet strict security standards
  </Card>

  <Card title="End-to-End Encryption" icon="lock">
    All credentials and data encrypted in transit and at rest
  </Card>

  <Card title="Zero Data Storage" icon="database">
    Julius only queries what you request—never stores your data
  </Card>
</CardGroup>

<Card title="Security & Trust Center" icon="shield-halved" href="https://julius.ai/security">
  Learn more about how Julius protects your data and maintains compliance
</Card>

***

## Best Practices

<AccordionGroup>
  <Accordion title="🔐 Use read-only credentials" icon="lock">
    Create a dedicated MySQL user with SELECT-only permissions to prevent accidental data modification.

    ```sql theme={null}
        CREATE USER 'julius_readonly'@'%' IDENTIFIED BY 'secure_password';
        GRANT SELECT ON your_database.* TO 'julius_readonly'@'%';
    ```
  </Accordion>

  <Accordion title="🧪 Test with non-production data first" icon="flask">
    Verify your connection works correctly using a development or staging database before connecting to production.
  </Accordion>

  <Accordion title="👥 Coordinate with your DBA" icon="users">
    Work with your database administrator to ensure proper security policies and performance guidelines are followed.
  </Accordion>

  <Accordion title="📊 Monitor database performance" icon="gauge-high">
    Keep an eye on database load when running complex queries through Julius, especially on production systems.
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection timeout" icon="clock">
    If you see an error like `Read timed out` or `Connection timed out while trying to reach the service`, check the following:

    **Possible causes:**

    * Incorrect host or port
    * Database doesn't allow external connections
    * Database is offline or unreachable
  </Accordion>

  <Accordion title="Authentication failed" icon="key">
    **Possible causes:**

    * Wrong username or password
    * User lacks database permissions
    * Database name misspelled

    **Solution:** Double-check credentials and verify user permissions
  </Accordion>

  <Accordion title="Can't find tables" icon="table">
    **Possible causes:**

    * User lacks read permissions on tables
    * Connected to wrong database
    * Tables don't exist in specified schema

    **Solution:** Verify user has SELECT permissions and correct database is specified
  </Accordion>
</AccordionGroup>

***

## Need Help?

<Card title="Contact Support" icon="envelope" href="mailto:team@julius.ai">
  Questions? Reach out to **[team@julius.ai](mailto:team@julius.ai)** for assistance
</Card>
