How To Connect to a Remote MongoDB Server with MongoHub for Mac
There are three parts to this process: Changing the
MongoDB Config to accept connections from remote hosts, Allowing port
27017 through your Firewall, and Configuring MongoHub.
Written: March 16, 2012
Applies to: Ubuntu 11.10, Mac OS X Lion
Here’s what you need to get started:
That’s it! You can now browse your secure database!
Written: March 16, 2012
Applies to: Ubuntu 11.10, Mac OS X Lion
Here’s what you need to get started:
- Install MongoDB on your Server. There are a million tutorials out there, but here’s the one I used at mongodb.org.
If you installed with apt-get install mongodb instead of apt-get install mongodb-10gen here’s how to UNINSTALL the older version after shutting down gracefully so you don’t wind up with an infuriating mongod.lock file.
Then go ahead and install the mongodb-10gen (latest stable) version. - Download and install MongoHub for Mac OS X.
Secure MongoDB.
- Start the shell and add an administrative user for the server.
Note: On my system, typing ./mongo doesn’t work, but plain mongo does. - Authenticate, still in the shell.
- Configure a specific user for another database.
- Exit the MongoDB shell.
- Edit the mongodb.conf file to enable authentication.
- Uncomment this line.
- Restart MongoDB
Open up Port 27017 on your Firewall
This will be different for everyone. As an alternative, you can run MongoDB on a different port, maybe something that’s already open on your firewall. You can change the port by editing the mongodb.conf file and restarting the server.Configure MongoHub
- Fire up MongoHub.
- Click the plus icon in the lower left to add a database.
- Fill out the information about your database.
That’s it! You can now browse your secure database!
No comments:
Post a Comment