How to add Datasource without having to use the GUI

Im trying to add MySQL as a datasource to my grafana server with following creds:
host: localhost:3306
user: root
password: ${PASSWORD}
database: testDB

Though Im able to do this using the GUI of the grafana server running on…
My question is, is there a way to Add Datasource to grafana without manually going into the UI?

Im trying to create a fully automated cicd pipeline that will visualize some benchmarking data using Grafana. Is Grafana capable of such full automation?

@munishbhardwaj You can use Provisioning. HTTP API can be an alternative for complex configuration.


YouTube tutorial