We use Docker to begin experimenting with Grafana with ease.
Dockers must be available. The following commands can be used to check.
docker --version
docker ps
Docker-Compose --version
-
Create a network for docker containers with the following command:
docker network create exp-grafana-mysql-network
-
(Optional) Put file to initialize MySQL on
./DB/
. For example, the samples by MySQL are useful. -
Build images with the following command:
Docker-Compose build
-
Run containers with the following command:
Docker-Compose up -d
-
You can use Grafana at http://127.0.0.1:3000
- Grafana data is persistent.
- MySQL data is NOT persistent and changes are lost when the container is deleted. This is because it is assumed that only SQL for viewing purposes by Grafana will be executed while the container is running.