The MongoDB GUI, Compass, offers additional functionality like data visualization and performance profiling as well as offering CRUD (create, read, update, delete) access to data, databases, and collections.įind out more at MongoDB Compass: The Easiest Way to Manage and Explore Your Data Prerequisites for using Compass with MongoDB Atlas Some users would rather work with a GUI to create and update their data and collections. To switch to a different database, type the use command and specify that database. The db command displays the name of the current database. Once you have access to a cluster via the MongoDB Shell, you can see all the databases in the cluster that you have access to using the “show” command: Open a terminal, run the mongosh command and log in to the MongoDB self-managed clusterįind out more at Connect to a Deployment from the MongoDB Shell Creating a MongoDB database with the CLI.Make sure the MongoDB Shell is installed on your computer.Make sure the MongoDB self-managed cluster is installed and running on your computer or the computer you are going to connect to.If you are running a self-managed cluster of MongoDB: Open a terminal emulator, run the mongosh command, and log in to the MongoDB Atlas clusterįind out more at Connect to Atlas via MongoDB Shell Prerequisites for using the CLI with a self-managed MongoDB cluster.Make sure you have the MongoDB Shell installed on your machine.Make sure you have a database user on the MongoDB cluster you want to use.Add your IP to the IP access list for your Atlas project. If you are using MongoDB Atlas, the steps to getting a shell are as follows: Prerequisites for using the CLI with MongoDB Atlas A shell is a program that allows you to enter commands into a software system. To create a database using a command-line interface, the first task is to get access to the MongoDB cluster you are using via the MongoDB Shell. Like most complex software systems, MongoDB can be controlled with what is called a command-line interface, often referred to as a CLI.īy entering commands into the CLI, you tell MongoDB how to operate, get information about how the MongoDB cluster is running, and perform fundamental actions like the one we will cover today: creating a database. You can manually enter new documents, or connect to the database using any of the MongoDB drivers. Deploy your first cluster in less than 10 minutesĬreating a MongoDB Database with the Atlas UIįrom your cluster page, click on “Browse Collections.”.Register a free Atlas account with your email address (no credit card required).To create a database on MongoDB Atlas, you will need to register an Atlas account and create your first forever-free cluster: This free tier is more than enough for the purposes of this article. A free tier is available with basic database functionalities. The easiest way to get started with MongoDB is by using the Atlas developer data platform. All methods are available for MongoDB Atlas, MongoDB’s developer data platform, and for self-managed clusters. In this article, we will cover how to create a database using the MongoDB Atlas UI (User Interface), the MongoDB Shell (mongosh), or using Compass, the MongoDB GUI. So you want to try MongoDB, but you're not sure how to create a database.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |