创建mysql数据库:
create database grafana;
创建用户:
create user grafana@'%' identified by 'grafana';
授权:
grant all on grafana.* to grafana@'%' ;
刷新:
flush privileges;
Grafana:(本地mysql)
修改配置文件:
vi /etc/grafana/grafana.ini
[database]
type = mysql
host = 127.0.0.1:3306
name = grafana
user = grafana
password =grafana
url = mysql://grafana:grafana@localhost:3306/grafana
[session]
provider = mysql
provider_config = `grafana:grafana@tcp(127.0.0.1:3306)/grafana`
保存,重启grafana服务:
service grafana-server restart
完成!!!