Cannot connect HA to influx db

I have setup influx DB created data base and user but it will not connect

InfluxDB database is not accessible due to ‘401: {“error”:“authorization failed”}’. Please check that the database, username and password are correct and that the specified user has the correct permissions set. Retrying in 60 seconds.

i have given access to the user in influx

this is my config
host: a0d7b954-influxdb
port: 8086
database: Homeassistant
username: Homeassistant
password: password
max_retries: 3
default_measurement: state