---
title: "Test the connection | Grafana Labs"
description: "Save and test your InfluxDB data source connection to verify Grafana can reach your instance."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Test the connection

Now that you’ve configured the connection details, save the data source and verify that Grafana can successfully connect to your InfluxDB instance.

1. Click **Save &amp; test**.
   
   The success message varies by query language:
   
   Expand table
   
   | Query language | Success message                               |
   |----------------|-----------------------------------------------|
   | Flux           | `datasource is working. X buckets found`      |
   | InfluxQL       | `datasource is working. X measurements found` |
   | SQL            | `OK`                                          |

### Common connection issues

Expand table

| Symptom                | Likely cause                                       | Solution                                                                        |
|------------------------|----------------------------------------------------|---------------------------------------------------------------------------------|
| Connection refused     | InfluxDB not running or wrong URL                  | Verify the URL and that InfluxDB is accepting connections on the specified port |
| Unauthorized (401)     | Invalid API token or credentials                   | Generate a new token with read access, or verify your username and password     |
| Organization not found | Incorrect organization name (Flux)                 | Check the organization name in your InfluxDB UI under Settings                  |
| Bucket not found       | Incorrect bucket name or token lacks access (Flux) | Verify the bucket name and that the token has read permission for it            |
| Database not found     | Incorrect database name (InfluxQL/SQL)             | Verify the database name in your InfluxDB instance                              |

In the next milestone, you’ll run a query and explore your InfluxDB data in Grafana.
