Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
17198807
Commit
17198807
authored
May 12, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: updated mysql docs
parent
910e54d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
docs/sources/features/datasources/mysql.md
+24
-0
No files found.
docs/sources/features/datasources/mysql.md
View file @
17198807
...
...
@@ -17,6 +17,30 @@ weight = 7
Grafana ships with a built-in MySQL data source plugin that allow you to query any visualize
data from a MySQL compatible database.
## Adding the data source
1.
Open the side menu by clicking the Grafana icon in the top header.
2.
In the side menu under the
`Dashboards`
link you should find a link named
`Data Sources`
.
3.
Click the
`+ Add data source`
button in the top header.
4.
Select
*MySQL*
from the
*Type*
dropdown.
### Database User Permissions (Important!)
The database user you specify when you add the data source should only be granted SELECT permissions on
the specified database & tables you want to query. Grafana does not validate that the query is safe. The query
could include any SQL statement. For example, statements like
`USE otherdb;`
and
`DROP TABLE user;`
would be
executed. To protect against this we
**Highly**
recommmend you create a specific mysql user with
restricted permissions.
Example:
```
sql
CREATE
USER
'grafanaReader'
IDENTIFIED
BY
'password'
;
GRANT
SELECT
ON
mydatabase
.
mytable
TO
'grafanaReader'
;
```
You can use wildcards (
`*`
) in place of database or table if you want to grant access to more databases and tables.
## Macros
To simplify syntax and to allow for dynamic parts, like date range filters, the query can contain macros.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment