DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Roy
Roy

Posted on

server returned error on SASL authentication step: Authentication failed

80

The following is my MongoDB connection dial from GoLang. But it's returning a panic "server returned error on SASL authentication step: Authentication failed.". My username, password, hostAddrs and dbName are correct. What am I missing here?

dbName: = os.Getenv("ENV_DBNAME")
userName: = os.Getenv("ENV_DBUSER")
password: = os.Getenv("ENV_DBPASS")
dbHost: = os.Getenv("ENV_DBHOST")
…

Top comments (0)

Regex for lazy developers

regex for lazy devs

You know who you are. Sorry for the callout πŸ˜†