My Go application has been connecting to a MongoDB (hosted on Compose.io) using MGO with no issues.
Today I decided to delete this database and add a different one (again using Compose). I updated the connection string.
So I connect using:
db, err := mgo.Dial("mongodb://<username>:<password>@dogen.mongohq.com:10048/db-name")
with the username and password in place.
Strangely, the application still appears to connect to the old database. I know this because I printed the
err message out which told me: not authorized for query on my-old-db-name after I tried to perform a query.
I have run
go install to compile again but still no luck.