MySQL connection fail

I am trying to connect to MySQL. I fill every field but when I submit the form I get message: “missing port in address”. Then I fill with port <my_ip>:3306 but get the next message " Access denied for user ‘stats’@‘’ (using password: YES)" That its not my IP and I think its a bug.

What does your connection string look like? It should be the same as the connection string you use to connect to mysql with any other program (like mysql workbench or similar).

Here is an example where the mysql server is localhost and on port 3307:

Sounds like you have a proxy or firewall problem? Does the same query string work from your computer outside of Grafana? (via the mysql cli or mysql workbench)

Same string works correctly from my computer and another computers.

Does your Grafana server have access to your mysql database? Is there a firewall or proxy between the Grafana server and the database?

I am using hosted grafana, I haven’t my own server.

That was important information - maybe you could have mentioned that a bit earlier…

Is your database available from the public internet? Is it even possible for Hosted Grafana to access your mysql db?

Sorry, There are password error. I already configured the data source, but
I can’t view any data sources in “Installed Datasources”. I am trying to
create graph from my datasource but I don’t know how to do it.


Not sure if you understood my follow up question?

  • Hosted Grafana is on our servers.
  • Your MySQL database is on your database server.
  • Most database servers are behind a firewall.
  • If you try to connect to the database server from outside the firewall then you are blocked by the firewall.

I think the problem is that Hosted Grafana cannot get through the firewall or that port 3306 is not open to the public internet. Do you have an operations or IT department that can help you set up a secure connection?

Oh sorry, I understood you, the problem was that the password was wrong. I
have already managed to connect to the database. The problem is that now I
can not connect the graphs with the datasource.

There is video guide here on creating dashboards in Grafana.

In the screenshot above, you are on the home page.

  1. Create a new dashboard or click on “New dashboard Copy” that you have already created.

  2. The row option is hard to see and is three gray dots but it is on the left hand side so click on that.

  3. Click on add panel

  4. Click on Graph

  5. Click on the title of the panel to bring up the context menu and then click “Edit”.

  6. Select the data source you want to use:

  7. Write your query:

To get MySQL data into time series form, you have to include three columns. A date time column, a value and a metric name so follow the template in the screenshot above and substitute the table name and column names.

Can we connect to a mysql datasource via a proxy/jump host? There is no direct connection from grafana to mysql

Yes, it is possible. Can’t really say more than that as there are no details in your question. There are lots of tools for this, for example a standard proxy like nginx or a more specialized proxy like ProxySQL.

Here is my Mysqldb connection information -

Here is the error I am getting on my locally hosted grafana workspace -

What I am trying to do is set my mysqldb as datasource for locally hosted grafana to display information on dashboards.
Can you help me find the cause of the error?

Don’t think it is implemented:

hi Tushar,
did you go past the "authentication not supported " message.
i am stuck with same… i am guessing it has something to do with mysql config…but, at the moment i am stuck.
any clues/hints?


Any update on this , Facing same issue while using ssl to mysql.

same problem sir
it is showing connection refused