1. mysql要做的操作
create database grafana;
create user grafana@'%' IDENTIFIED by 'grafana';
grant all on grafana.* to grafana@'%';
flush privileges;
2. 修改grafana配置
vim /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`