Giter Site home page Giter Site logo

Comments (4)

bralandealmeida avatar bralandealmeida commented on September 27, 2024 2

For those who are facing this problem, we have to pass the authentication database, otherwise mongoDB will try to authenticate itself using the database we are informing.

db: mongodb://user:pass@host:port/database?authSource=admin

from winston-mongodb.

wbt avatar wbt commented on September 27, 2024

@bralandealmeida you might find more luck on StackOverflow, if you don't find others encountering the same issue here.
I assume you are replacing user, pass, host, port, and database with their appropriate values and the user has permissions to use that specific database, not just create databases.

from winston-mongodb.

bralandealmeida avatar bralandealmeida commented on September 27, 2024

Yes. I replace the values with environment variables and, as I said, when I remove the database from the mongodb connection uri it works normally ๐Ÿคจ.

from winston-mongodb.

wbt avatar wbt commented on September 27, 2024

That suggests to me that the user you're trying to connect with might not have the necessary permissions on the database you're trying to use, OR there's some error in the process of importing the environment variables. (For example, you might find an over-literal interpretation and discover that the password you're trying to connect with is %PASSWORD% or something like that.)

from winston-mongodb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.