some time ago our MySQL database changed its configuration and enabled “–require_secure_transport=ON” and we connect using TLS with our SQL tooling (for me IntelliJ).
Error message I get:
“logger=tsdb.mysql t=2023-01-16T10:32:40.287979533+01:00 level=error msg=“Query error” error=“Error 3159: Connections using insecure transport are prohibited while --require_secure_transport=ON.””
I can connect using IntelliJ just by enabling TLS/SSL checkox. No certificate or any other file is needed.
I tried the checkboxes in various constellations but none were successful. I didn’t add any information in the appearing boxes as this shouldn’t be necessary.
Can you please help me how I can configure this or is this a bug?
A year after the problem seems to persist, I’ve tried with latest 9.4.17 and I still can’t configure a datasource using secure transport.
In my case I’m using Azure Mysql Flexible Server. I’ve been able to configure the database for grafana using secure connection but the datasource is not able to connect. Always throws an error
[xorm] [info] 2024/02/26 13:29:32.122745 PING DATABASE mysql
logger=tsdb.mysql t=2024-02-26T13:29:32.152392869Z level=error msg="Query error" error="Error 3159: Connections using insecure transport are prohibited while --require_secure_transport=ON."
logger=context userId=1 orgId=1 uname=admin t=2024-02-26T13:29:32.15256794Z level=info msg="Request Completed" method=GET path=/api/datasources/uid/XW_8ALoIz/health status=400 remote_addr=127.0.0.1 time_ms=39 duration=39.459766ms size=91 referer=http://localhost:8080/grafana/datasources/edit/XW_8ALoIz/ handler=/api/datasources/uid/:uid/health
It’s a grafana issue as specified in the github ticket.You are e.g. not using the “preferred mode” for mysql as most mysql clients do. And you allow TLS only when a certificate file is provided, which is actually optional.
But since the bug was not solved I stopped using it. I don’t wanna keep my own grafana patched source code just for this.
The problem is not in the server side. Indeed I am using the same MySQL as grafana backend , but the datasource to enable dashboards to connect to mysql does seems to contemplate an SSL connection without client authentication
That’s I am gonna do. I asked on the ticket too. I was only setting it up because of a mysql dashboard found that requires it. I will left it a part because even the latest version of grafana released suffers from the same issue.