Grafana Fails to Connect to SQL Server (MSSQL)

Hi everyone,

I’m trying to connect Grafana to my SQL Server database, but I keep running into connection issues. Despite following all the necessary steps, the connection still fails. Below are my setup details

Environment Dand troubleshooting steps:etails:

Grafana Version: [Your Grafana Version]

SQL Server Version: SQL Server Management Studio Management Studio 19

Operating System: Windows

Error Messages:

[Include any exact error message from Grafana]

I’m running out of ideas on what might be causing the issue. Any suggestions on what else I should check?

Thanks in advance for your help!

1 Like

What are you using to connect to Ms sql?

I don’t get what you mean. Can you explain more clearly?

are you using sql authentication for your ms sql datasource?

yes, i’m

Maybe it’s because I use sql server in a virtual machine with a different network so I can’t connect. but when I try to connect grafana on the same virtual machine I get the same error

1 Like

help me!!

Can you connect to it using ssms and that SQL user? Is SQL user authentication enabled on server

If you are trying to connect to Grafana from your DB hosted in your/your office network and Grafana is outside the network, you need to setup a PDC agent to establish connection.

Documentation for PDC setup: Private data source connect (PDC) | Grafana Cloud documentation