简体   繁体   中英

Hosting mongoDB database locally, and being able to connect from an external network

I am currently trying to host a MongoDB database on my local.network (raspberry pi) and have the ability to connect to it from my google cloud server.

I have been having severe difficulties doing this and have recently found out that it's because the IP which the MongoDB is hosted on, is a local IP.

I have scouwered the web looking for a solution to hosting a local MongoDB database on another IP that can be connected to on my local.network, but have not managed to find anything.

Any help would be really handy.

Was actually way easier than I thought, once I knew what to do.

Create port forward on my virgin media hub from my raspberry PI IP with the mongodb port, then in my mongodb connection instead of using my local IP i just use my public IP and it redirects the request to my raspberry pi.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM