How can i solve this error: bad auth : Authentication failed

MongoServerError: bad auth : Authentication failed.
    at MessageStream.messageHandler (C:\Users\sudha\OneDrive\Desktop\blog-reacts\api\node_modules\mongodb\lib\cmap\connection.js:467:30)
    at MessageStream.emit (events.js:400:28)
    at processIncomingData (C:\Users\sudha\OneDrive\Desktop\blog-reacts\api\node_modules\mongodb\lib\cmap\message_stream.js:108:16)
    at MessageStream._write (C:\Users\sudha\OneDrive\Desktop\blog-reacts\api\node_modules\mongodb\lib\cmap\message_stream.js:28:9)
    at writeOrBuffer (internal/streams/writable.js:358:12)
    at MessageStream.Writable.write (internal/streams/writable.js:303:10)
    at TLSSocket.ondata (internal/streams/readable.js:726:22)
    at TLSSocket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:290:12)
    at readableAddChunk (internal/streams/readable.js:265:9) {
  ok: 0,
  code: 8000,
  codeName: 'AtlasError'
}
1 Like

You can solve this error by supplying a valid user name and password.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.