Hey I realise this is a really late reply. The issue at the time was…
I had an environment variable set to the same name on my machine level from a project many years ago, so even though I had an env file with the correct credentials, the environment variable being read was the machine level one.
You can imagine the facepalm moment I had when I finally tracked down the cause.