CREATE DATABASE grafana DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON grafana.* TO 'grafana' @'192.168.102.130' IDENTIFIED BY 'grafana'; FLUSH PRIVILEGES;
#################################### Database ############################ [database] # You can configure the database connection by specifying type, host, name, user and password # as separate properties or as on string using the url property. # Either "mysql", "postgres" or "sqlite3", it's your choice type = mysql host = 192.168.102.129:3306 name = grafana user = grafana # If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" password = grafana
nohup /usr/local/prometheus/grafana-9.0.5/bin/grafana-server -config "/usr/local/prometheus/grafana-9.0.5/conf/defaults.ini" >/usr/local/prometheus/grafana-9.0.5/grafana.log 2>&1 &
启动成功后会自动创建系统相关表
添加数据之后在添加一个查询编辑器