Grafana can't find retention policy

I have set up Grafana and InfluxDB in a docker on my Synology NAS.

It all seems to work OK. I have created a database and set a retention policy of 6 months.

Grafana connects to it OK but as soon as I try to create the dashboard query I get the error “InfluxDB Error: retention policy not found: MyDB”

This is really strange as SHOW RETENTION POLICY confirms that the policy is present

Any suggestions?