Unable to connect InfluxDb from Grafana

have installed Influxdb V1.8 in other server and Telegraf & Grafana installed in one serser.

now I try to connect to InfluxDb from Grafana but cant getting - Network Error: Bad Gateway(502)

even have enabled auth-enabled = true
please help me on this and let me know if you need any more info

What have you configured in Grafana for that data source?

Do not be misled by selecting a new data source as Influx and seeing
http://localhost:8086” in the box and thinking that is a default value - it
is not - it is an example, and if you’re happy with it, you still have to type
it in yourself.

I think this is very poorly indicated in the user interface.

Regards,

Antony.

have given http://serverip where InfluxDb:8086
even I can not access InfluxDb using above url -

also I got to see below error when try to re-install InfluxDb - any help on this please -
[root@aws185 ~]# sudo yum localinstall influxdb-1.8.0.x86_64.rpm
Loaded plugins: fastestmirror
Examining influxdb-1.8.0.x86_64.rpm: influxdb-1.8.0-1.x86_64
influxdb-1.8.0.x86_64.rpm: does not update installed package.
Nothing to do