Grafana V8.1 error connect to Localhost MSSQL 2019 Ver 15.0.2000

Hi All,
I’m using grafana * v8.1.2 (103f8fa094) and MSSQL 2019 Ver 15.0.2000 in same machine on window 10 64 bit.

However there is an error “access denied” as figure below:

The grafana log as below:
t=2021-09-03T14:04:58+0700 lvl=eror msg=“Access denied” logger=context userId=1 orgId=1 uname=admin error=“parse “http://localhost\\SQLEXPRESS01”: invalid character “\\” in host name” remote_addr=[::1]
t=2021-09-03T14:04:58+0700 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=POST path=/api/ds/query status=403 remote_addr=[::1] time_ms=4 size=27 referer=http://localhost:3000/datasources/edit/92PrbY4nk

could you advice the issue?

Regards
Mansur

1 Like

Try the hostname just to be sure, “EMHA/SQLEXPRESS01”, otherwise set up a empty DB and give read access and try there, might be SQL Server setting

Hi T_Grumpy,

curently my problem was solved. please see my step:

  1. Open the microsoft sql server studio, right click the database properties and check the option sql server windows authentication mode


  2. Open sql server configuration manager, click Sql server network configuration → protocols for SQLEXPRESS01, then enable the TCP/IP

  3. after enable TCP/IP, re-right click the properties as green box to set the port 1433 to IPALL and then OK

  4. Open the firewall port for TCP and UDP to 1433. create new inbound rule for port 1433, select TCP and OK. then recreate for UDP also in same port 1433.

  5. insert your DB confguration into grafada.

1 Like

That Allow SQL Logins Always gets me, great you solved it