![]() ![]() ![]() Afterwards, you can safely close the MongoDB Compass application. From here, you can find your database server name and port from. By default the MongoDB runs on port 27017, if you wish to change the port for your machine, you can use the command as: docker run -name -mongodb -d -p 64000:27017 mongo docker exec -it mongodb and login to the shell. When you to stop the components after you are done working, click the connect menu in the menu bar and select disconnect to stop the connection to your MongoDB server. Under the Overview tab, find your Connection String. The admin, config, and local are default databases and you shouldn't delete them. As soon as you click connect, Compass connects to your local server and shows information about the databases within and allow you to manage your data using the graphical user interface. If you click connect without entering any connection string, mongo will just connect to the local database running with the default configurations.Ĭlick Connect to connect to the MongoDB server running on your machine. Once it is open, the initial screen will give you the opportunity to connect to a running MongoDB server by providing a connection string: The next step is to understand how to use MongoDB Compass (it is a very simple and straightforward process). If it doesn't open immediately, you can open it by just searching for it from your taskbar. Next, click Install to begin installing all of the MongoDB components on your computer.Īfter the installation is complete, MongoDB Compass will open automatically. (Here we have to tick the checkbox to install MongoDB Compass since this tutorial was made for using MongoDB and Compass) Next, click the checkbox to to install MongoDB Compass, a graphical interface that you can use to connect to and manage MongoDB servers. Click Next when you are satisfied with your selections. Working on a local database is part of developing any web, desktop, or mobile application. This is the default port the MongoDB database server listens to the commands. The default values should work well for most scenarios. To connect your application with your local MongoDB database, you need to connect MongoDB on the localhost 27017 port. Read the end-user license agreements and make sure you click the checkbox to agree with the user terms so that you can proceed to the next page.Ĭlick on the complete button to install all MongoDB features and components. If connecting fails on your machine, try using 127.0.0.1. Follow this link to visit the download page for the MongoDB Community Server and and download the latest MSI installer for Windows:Īs soon as the download completes double click the file and run the installer. This is the minimum needed to connect the myapp database running locally on the default port (27017). ![]()
0 Comments
Leave a Reply. |