我是Grafana的新手,并试图将Grafana连接到。我使用Windows操作系统在同一台机器上运行Grafana和SQL server。在Grafana中,我选择了Server数据源,并提供了主机和数据库名称。我在server中创建了一个用户,并按照https://grafana.com/docs/grafana/latest/datasources/mssql/向用户授予了读取器权限。无论是对于server身份验证还是Windows,我都会得到错误db query error: failed to connect to server - please inspect Grafana server log for details。我检查了Grafana日志文件:lvl=eror msg="query error" logger=tsdb.mssql err="Unable to open tcp connection with host 'servername:1433': dial tcp [2a02:908:1391:9e80:c180:xxxx:xxxx:xxxx]:1433: connectex: No connection could be made because the target machine actively refused it." --如何强制SQL server授予对Grafana的访问权限?
我应该说,我没有更改Grafana conf文件。我需要更改默认的conf还是创建另一个conf文件?Grafana conf文件中的默认DB配置是:
[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url property.
# Either "mysql", "postgres" or "sqlite3", it's your choice
type = sqlite3
host = 127.0.0.1:3306
name = grafana
user = root
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
password =
# Use either URL or the previous fields to configure the database
# Example: mysql://user:secret@host:port/database
url =
# Max idle conn setting default is 2
max_idle_conn = 2
# Max conn setting default is 0 (mean not set)
max_open_conn =
# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
conn_max_lifetime = 14400
# Set to true to log the sql calls and execution times.
log_queries =
# For "postgres", use either "disable", "require" or "verify-full"
# For "mysql", use either "true", "false", or "skip-verify".
ssl_mode = disable
# Database drivers may support different transaction isolation levels.
# Currently, only "mysql" driver supports isolation levels.
# If the value is empty - driver's default isolation level is applied.
# For "mysql" use "READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ" or "SERIALIZABLE".
isolation_level =
ca_cert_path =
client_key_path =
client_cert_path =
server_cert_name =
# For "sqlite3" only, path relative to data_path setting
path = grafana.db
# For "sqlite3" only. cache mode setting used for connecting to the database
cache_mode = private发布于 2021-08-31 08:04:44
Grafana的配置文件中的设置引用其内部数据库,因此您不需要更改其中任何一个来连接到MS。
Authentication
错误
发布于 2022-08-05 04:43:33
使用计算机IP地址的Docker主机遵循以下步骤:
打开CMD
IPCONFIG /ALL
192.168.1.24和172.45.202.1,respectively
1433/5436)
192.168.1.24:1433和172.45.202.1:1433访问所有使用DockerH 221G 222托管的容器应用程序https://stackoverflow.com/questions/68937795
复制相似问题