Web Programming TutorialsLearn How To Work With RockMongo Administration Tool

Learn How To Work With RockMongo Administration Tool

In this chapter, we are going to learn about the RockMongo tool, which is a well-known MongoDB administration tool. Using the RockMongo tool, we can easily manage our server, databases, documents, collections, indexes, etc. in MongoDB through a GUI(Graphical User Interface). It provides a simplified and user friendly interface with which we can easily read, write and create documents in MongoDB. It can be compared with PHPMyAdmin tool which is widely used to administer the MySQL database through the GUI console.

How to Download the RockMongo tool?
We can procure and download the latest version of RockMongo tool from the following link. The RockMongo tool is a web application, which is written in PHP 5.
https://github.com/iwind/rockmongo
RM Tools

How to Install RockMongo tool?
The following are the steps for the installation of the RockMongo tool.
Step 1: – The downloaded zip file can be unzipped on the web server root folder and we can rename the package according to our choice (say rock-mongo).
Step 2: – Make sure that your web server is running, then open the web browser and access the index.php page which is present inside the rock-mongo folder.
Step 3: – You may require php_mongo.dll file to be included under your ‘/php/ext’. It can be downloaded from the following link.
http://www.php.net/manual/en/mongo.installation.php
Step 4: – Add the following extension inthe /php/php.ini file.

DLL file

extension=php_mongo.dll

Step 5: – If you require to implement step 3 and 4 then you may require the web server restart. Otherwise, directly jump to step 6.

Step 6: – When your web server is up and running. You can browse the following URL in the web browser.
http://localhost/rock-mongo/
Step 7: – Enter the following default credentials in order to login into RockMongo tool.

Type

Value

username

admin

password

admin

This completed the procedure for the installation of the RockMongo tool.

RockMongo Tool Application
The RockMongo tool helps perform multiple DB operations in the similar way as PHPMyAdmin allows operations for MySQL database. Here, in this chapter we are going to discuss some of the basic database operations, which are very frequently used while working with MongoDB.

1. Creation of New database in MongoDB via RockMongo tool: – We can create a new database using the RockMongo tool by simply clicking on the Databases tab. Next, click on “Create New Databases” link. It will take you to a new screen where you need to provide the new database name that you want to create. Click on the Create link to finish new database creation in MongoDB. After this step, you can see that on the left panel of RockMongo console, a new database has been created.
2. Creation of New Collection in MongoDB via RockMongo tool: – We can create a new collection inside a database using the RockMongo tool and by simply clicking on Database from the left panel. Next, click on the “New Collection” link present on the top. Next, you need to provide the new collection name which you want to create. Click on the Create link to finish new collection creation in MongoDB for the selected database. After this step, you can see that in the left panel of RockMongo console, a new collection has been created. You can configure collection fields such as Is Capped, Max, and Size, etc. later after the creation of the collection.
3. Creation of New Document in MongoDB via RockMongo tool: – We can create a new document inside a collection using the RockMongo tool by simply clicking on Collection on the left panel. When you click on a particular collection where you want to add a new document, you can see that all of the existing documents present in that collection listed down on the console. Now, simply click on the “insert” link present at the top in order to create a new document within the selected collection. You can insert the required data within the document either in an array format or JSON format. Next, click on the “Save” link to persist the data permanently.
4. Export and Import Data using RockMongo tool: – We can easily import and export data for any collection present in MongoDB via the RockMongo tool. We need to click on the collection present on the left hand panel for which we need to import and export data. Next, click on the “Export / Import” link present on the top panel. Now, you need to follow the given instructions in order to export the required data in zip format or import back the required data through an external zip formatted file.

Conclusion: –
In this chapter, we have covered the download and installation of the RockMongo tool which is used as a GUI for MongoDB that acts similar to PHPMyAdmin tool used for MySQL database. Later, we have discussed the utilities of the RockMongo tool for the frequently used database operation in MongoDB such as database creation, collection creation in a database, document creation in a collection and the import/export of data.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Exclusive content

- Advertisement -

Latest article

21,501FansLike
4,106FollowersFollow
106,000SubscribersSubscribe

More article

- Advertisement -