## ADD REPO

helm repo add grafana https://grafana.github.io/helm-charts

## BACKUP DATABASE

mysqldump -h 127.0.100.1 -p -uroot grafana > /home/cristian/Documentos/mysql-cur-backups/grafana/mariadb.default.svc.cluster.local-grafana-2023-06-29.sql

## CREATE DATABASE

kubectl exec --stdin --tty mariadb-primary-0 -- /bin/bash

CREATE DATABASE grafana;

USE grafana;

GRANT ALL PRIVILEGES ON *.* TO 'grafana'@'%' IDENTIFIED BY 'autismo-raptado-tejados-casare';

GRANT ALL PRIVILEGES ON grafana TO 'grafana'@'%';

## UPLOAD BACKUP

mysql -p -ugrafana -h 127.0.200.1 --one-database grafana < /home/cristian/Documentos/mysql-cur-backups/grafana/mariadb.default.svc.cluster.local-grafana-2022-09-27.sql

mysql -p -ugrafana -h 127.0.200.1 --one-database grafana < /home/cristian/Documentos/mysql-cur-backups/grafana/mariadb.default.svc.cluster.local-grafana-2023-01-25.sql


## HELM INSTALL

helm install grafana-dialbox-cloud grafana/grafana -n monitoring --version=6.46.0 --values values.yaml

## HELM UPGRADE

helm upgrade grafana-dialbox-cloud grafana/grafana -n monitoring --version=6.46.0 --values values.yaml