fishhau
fishhau

Reputation: 489

Installed MongoDB version does not match db.version()

On my Mac I've just installed MongoDB Community Server version 4.2.0 which is the latest at the time of this post.

I've navigated to the downloaded bin folder and started mongod with a specified dbpath. It shows me db version v4.0.4 on the terminal.

I also use Robo 3T as my database GUI and when I run db.version(), it returns 4.0.4.

Why is it not showing 4.2.0? 4.2.0 is the one I downloaded and am currently running via terminal. I've already tried terminating and starting mongod using CTRL+C in the terminal.

Anyone have any ideas?

Upvotes: 1

Views: 260

Answers (1)

fishhau
fishhau

Reputation: 489

I figured it out. It turns out that one of the packages I have on brew had installed an instance of mongodb as a dependency. I had to uninstall that mongodb instance from brew and now I'm getting the correct latest version. I'm on Mac OS by the way. Hope this helps anyone facing the same issue.

Upvotes: 1

Related Questions