mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
56 lines
2.3 KiB
HTML
56 lines
2.3 KiB
HTML
|
|
<h3 class="page-heading">MySQL Connection</h3>
|
|
|
|
<div class="gf-form-group">
|
|
<div class="gf-form max-width-30">
|
|
<span class="gf-form-label width-7">Host</span>
|
|
<input type="text" class="gf-form-input" ng-model='ctrl.current.url' placeholder="localhost:3306" bs-typeahead="{{['localhost:3306', 'localhost:3307']}}" required></input>
|
|
</div>
|
|
|
|
<div class="gf-form max-width-30">
|
|
<span class="gf-form-label width-7">Database</span>
|
|
<input type="text" class="gf-form-input" ng-model='ctrl.current.database' placeholder="database name" required></input>
|
|
</div>
|
|
|
|
<div class="gf-form-inline">
|
|
<div class="gf-form max-width-15">
|
|
<span class="gf-form-label width-7">User</span>
|
|
<input type="text" class="gf-form-input" ng-model='ctrl.current.user' placeholder="user"></input>
|
|
</div>
|
|
<div class="gf-form max-width-15">
|
|
<span class="gf-form-label width-7">Password</span>
|
|
<input type="password" class="gf-form-input" ng-model='ctrl.current.password' placeholder="password"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h3 class="page-heading">MySQL details</h3>
|
|
|
|
<div class="gf-form-group">
|
|
<div class="gf-form-inline">
|
|
<div class="gf-form">
|
|
<span class="gf-form-label width-9">Min time interval</span>
|
|
<input type="text" class="gf-form-input width-6" ng-model="ctrl.current.jsonData.timeInterval" spellcheck='false' placeholder="1m"></input>
|
|
<info-popover mode="right-absolute">
|
|
A lower limit for the auto group by time interval. Recommended to be set to write frequency,
|
|
for example <code>1m</code> if your data is written every minute.
|
|
</info-popover>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="gf-form-group">
|
|
<div class="grafana-info-box">
|
|
<h5>User Permission</h5>
|
|
<p>
|
|
The database user should only be granted SELECT permissions on the specified database & tables you want to query.
|
|
Grafana does not validate that queries are safe so queries can contain any SQL statement. For example, statements
|
|
like <code>USE otherdb;</code> and <code>DROP TABLE user;</code> would be executed. To protect against this we
|
|
<strong>Highly</strong> recommmend you create a specific MySQL user with restricted permissions.
|
|
|
|
Checkout the <a class="external-link" target="_blank" href="http://docs.grafana.org/features/datasources/mysql/">MySQL Data Source Docs</a> for more information.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|