Not able to connect my MS sql server Database Source

When i am using localhost:1433
error message :

Unable to open tcp connection with host ‘localhost:1433’: dial tcp 127.0.0.1:1433: connectex: No connection could be made because the target machine actively refused it.

How does it look when you connect using sql server management studio for example, hostname/ip etc? Can you connect then?

d1
please look in picture

please find below two pic and their error messages

Don’t think SQL Server Express supports encryption.

If you try with host localhost:1433 again and change User to sa; encrypt=disable does that make any difference?

Another possible thing could be that tcp/ip is disabled. You must enabled it: http://support.webecs.com/kb/a868/how-do-i-configure-sql-server-express-to-allow-remote-tcp-ip-connections-on-port-1433.aspx

i done above step.
the output is

i done above step.
the output is

Please try and disable the firewall just to make sure that’s not the issue.
Please try with the IP you had first
Please try with the IP you had first and localhost changing User to sa; encrypt=disable

hi, i had ‘… actively refused’ too. SQL2017 and Grafana 6 both on localmachine with Windows 10.
Looking at the Windows Logs Application at the SQL Service restart messages i found:
“Server is listening on [ 127.0.0.1 1434].”
So changing to localhost:1434 fixed it :wink:

Hi All,

I am having the same issue, it seems that none of the above action item is working.
Can you please help.

Hi,

I soved this issue by the following steps:

  • Open Sql Server Configuration Manager
  • From the left sidebar select and expand SQL Server Network Configuration
  • Select Protocols for MSSQLSEREVER
  • Then just enable TCP/IP and Named Pipes protocols
  • Restart SQLServer Service.
3 Likes

A combination of what you have listed and what WillianV said above worked for me. In the log I found “Server is listening on [‘any’ 61438]” When I changed to port 61438 I got a connection.

I have the same issue but I have not fixed it using your method :stuck_out_tongue:

Hi, I solved the problem by using answer from nasirtaha and turn off my firewall. Host port can be found from TCP/IP, that is 1433 for my case.

encrypt seems no problem.

.
Running this service in SQL Server Configuration then you will able to connect. Hope you are success

this is server name. dont use that,
user Database name

Hi, please check <server>\<instance>:0 or <instance name>:0 it will work

1 Like

Hi

We have upgrade grafana from 6.5 to 7.3 version. However we are not able to connect to SQL Server and getting below error message.

Login error: mssql: Login failed for user ‘svc_grafana’.

It was working fine in Grafana 6.5. We are using SQL Server 2016 database to connection and we are able to ping the server from the server where we have configured grafana. Please help us with the solution.