
To protect against this we Highly recommend you create a specific mysql user with restricted permissions.Įxample: CREATE USER 'grafanaReader' IDENTIFIED BY 'password' For example, statements like USE otherdb and DROP TABLE user would beĮxecuted. The queryĬould include any SQL statement. Grafana does not validate that the query is safe. The specified database and tables you want to query. The database user you specify when you add the data source should only be granted SELECT permissions on You can also override this setting in a dashboard panel under its data source options. We recommend setting this value to match your MySQL write frequency.įor example, use 1m if MySQL writes data every minute. This value must be formatted as a number followed by a valid time identifier: Identifier

The Min time interval setting defines a lower limit for the $_interval and $_interval_ms variables. This should always be lower than configured wait_timeout in MySQL (Grafana v5.4+). The maximum amount of time in seconds a connection may be reused, default 14400/4 hours. If set will set the maximum number of idle connections to the number of maximum open connections (Grafana v9.5.1+). The maximum number of connections in the idle connection pool, default 100 (Grafana v5.4+). The maximum number of open connections to the database, default 100 (Grafana v5.4+). For more information, refer to the MySQL documentation. If you leave this field empty, then the time zone is not updated. Set the value used in the session with SET time_zone='.'. This is necessary, if the timezone of the database (or the host of the database) is set to something other than UTC.

Specify the time zone used in the database session, such as Europe/Berlin or +02:00. The IP address/hostname and optional port of your MySQL instance. This is how you refer to the data source in panels and queries.ĭefault data source means that it will be pre-selected for new panels. Set the data source’s basic configuration options. The Settings tab of the data source is displayed. Under Your connections, click Data sources. To access the data source configuration page: Only users with the organization administrator role can add data sources.Īdministrators can also configure the data source via YAML with Grafana’s provisioning system.
#Mysql add column with concated data how to#
Grafana ships with a built-in MySQL data source plugin that allows you to query and visualize data from a MySQL compatible database.įor instructions on how to add a data source to Grafana, refer to the administration documentation.

Usage of time_sec will eventually be deprecated. Starting from Grafana v5.1 you can name the time column time in addition to earlier supported time_sec.
