[SOLVED]-WSL 2 CANNOT CONECT TO MONGODB-REACTJS

WSL 2 CANNOT CONECT TO MONGODB-REACTJS

try this:-

mongod.exe --bind_ip=0.0.0.0

or with wsl ip

mongod.exe --bind_ip=192.***.**.1

if you are getting authentication errors.

go to task manager and stop all mongodb process & restart. i didn’t have to change any ip or port.
you may want to edit your /etc/mongodb.conf to make mongodb listen on 0.0.0.0 so we can access mongodb from windows.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments