No connection could be made because the target machine actively refused it

Hi Team,

I using grafana in the same server and trying to connect a SQL database . While trying to configure the new datasource I’m getting the following error

No connection could be made because the target machine actively refused it.
Kindly help me to resolve this issue

Can you connect to the SQL server from the Grafana machine using a command-
link SQL client using the same username / password as you’re putting into
Grafana?

Antony.

Sure… I will try and let you know if I faced any issue.

This error is occurring because there is no server listening at the hostname and port you assigned. It literally means that the machine exists but that it has no services listening on the specified port . So, no connection can be established. Generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port.