@naren Check out this recent thread on using Grafana, Influxdb and Node-Red, we discuss at length strategies for data collection including local hosting. Using MySQL will be very similar to what is discussed here.
Let me know if you have anymore questions. -G