
Step # 4: Inserting a Document in the Collection in MongoDB Compass: After providing the names of the database and the collection, you have to click on the Create Database button as shown below: Upon clicking this button, you will be asked to type in the name of your database as well as the name of the collection that you want to create inside this database (you can even create more collections inside the same database later). You can create a new one by clicking on the Create database button. Here, all the three default databases will be presented to you. You should click on the Databases tab for creating a new database. Step # 3: Creating a Database and a Collection in MongoDB Compass:Īfter connecting to the MongoDB database, you can create a database and a collection in MongoDB Compass very easily. For that, you will have to type in your Local Host Address in the space provided and click on the Connect button as shown in the image below: Now, you need to connect to the MongoDB database. Step # 2: Connecting to the MongoDB Database in Ubuntu 22.04:

From here, you need to click on the Start Using Compass button for proceeding further. When you close the welcome message dialogue box, you will be presented with the Privacy Settings dialogue box as shown in the following image. The welcome interface of the MongoDB Compass tool is shown in the image below: You can launch the MongoDB Compass by looking for it in the Application Menu’s search bar of your Ubuntu 22.04 system and clicking on the relevant search result. Once the MongoDB server starts running on your system, you can carry out the following steps: Step # 1: Launching MongoDB Compass on Ubuntu 22.04: You can run the MongoDB server by executing the “mongo” command in your system’s terminal. Eventually, you will not be able to work with the MongoDB Compass. Otherwise, you will not be able to connect to the MongoDB database.

Usage of MongoDB Compass on Ubuntu 22.04:īefore starting to use the MongoDB Compass, you need to ensure that the MongoDB server is running on your Ubuntu 22.04 system. Upon a successful installation of the MongoDB Compass on Ubuntu 22.04, the output shown below will appear on the terminal: You can get the exact subdomains for the -uri part from Atlas.$ sudo dpkg –i mongodb-compass_1.15.1_b
#MONGODB COMPASS CREATE LOCAL DATABASE PASSWORD#
Username and password are the ones you use to connect to atlas cluster, listed in the "Security/Database Access" section. Then you have to upload the backup to Atlas: mongorestore dump/ It will create dump directory with all collections you have.

Both commands are available in cmd and PowerShell consoles.įirst you backup your local database : mongodump and password are the ones you use in compass to connect to the source database.

In this case you will need to follow CLI mongodump/mongorestore way suggested in the comments. Unfortunately it has some limitations related to data type conversion from BSON to JSON and may be a bit tedious if you have large number of collections. It's UI oriented so just follow the click-through guide in the documentation. It's built into Compass and must be simpler to use considering limited experience with mongo. I would recommend to try export/import first. To save you some reads, you have to options - export/import and mongodump/mongorestore.
