Azure sql database 迁移到Azure SQL后端-数据包。转到:36-对等方重置连接

Azure sql database 迁移到Azure SQL后端-数据包。转到:36-对等方重置连接,azure-sql-database,grafana,Azure Sql Database,Grafana,在这里询问以及grafana github,这是一个一般性问题 我们最近有一个离开MariaDB的要求,我正在尝试将grafana迁移到使用azure sql后端 Grafana 7.1 OS CentOS 7 Azure sql database (cloud) 我可以使用telnet从虚拟机连接到数据库 从客户端到数据库的远程登录 Trying 10.xx.xxx.xxx...1433 Connected to myhostname.database.windows.net. Escap

在这里询问以及grafana github,这是一个一般性问题

我们最近有一个离开MariaDB的要求,我正在尝试将grafana迁移到使用azure sql后端

Grafana 7.1 
OS CentOS 7
Azure sql database (cloud)
我可以使用telnet从虚拟机连接到数据库

从客户端到数据库的远程登录

Trying 10.xx.xxx.xxx...1433
Connected to myhostname.database.windows.net.
Escape character is '^]'.
Connection closed by foreign host.
我更改了grafana.ini中的设置,将连接字符串作为URL传递,并且conn_max_life小于“30”

启动日志

Sep 06 20:18:44 grafana7-1005086944-2-1009631108 grafana-server[8755]: [mysql] 2020/09/06 20:18:44 packets.go:36: read tcp 10.xx.xxx.xxx:42552->10.xx.xxx.xxx:1433: read: connection reset by peer
Sep 06 20:18:49 grafana7-1005086944-2-1009631108 grafana-server[8755]: [mysql] 2020/09/06 20:18:49 packets.go:36: read tcp 10.xx.xxx.xxx:42562->10.xx.xxx.xxx:1433: read: connection reset by peer
Sep 06 20:18:55 grafana7-1005086944-2-1009631108 grafana-server[8755]: [mysql] 2020/09/06 20:18:55 packets.go:36: read tcp 10.xx.xxx.xxx:42566->10.xx.xxx.xxx:1433: read: connection reset by peer
Sep 06 20:18:55 grafana7-1005086944-2-1009631108 grafana-server[8755]: t=2020-09-06T20:18:55+0000 lvl=info msg="[SQL] SELECT `TABLE_NAME` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? and `TABLE_NAME`=? []interface {}{\"crcgr
Sep 06 20:18:55 grafana7-1005086944-2-1009631108 grafana-server[8755]: t=2020-09-06T20:18:55+0000 lvl=eror msg="Server shutdown" logger=server reason="Service init failed: Migration failed err: driver: bad connection"

packets.go:36
我试着将max_idle_conn、max_open_conn、conn_max_LIFE切换到不同的值,但我仍然无法连接到工作。有人能给我指点我该做什么吗

我可以从azure中看到可能使用了不同的驱动程序,但不确定如何处理此问题

// Go connection Sample Code:
package main
import (
    github.com/denisenkom/go-mssqldb
    database/sql
    context
    log
    fmt
    errors
)

似乎我们无法在Azure sql中存储Grafana服务器设置:您还有其他问题吗?
// Go connection Sample Code:
package main
import (
    github.com/denisenkom/go-mssqldb
    database/sql
    context
    log
    fmt
    errors
)