CONNECTING MONGODB COMPASS TO LOCAL HOST || DATABASES
HTML-код
- Опубликовано: 8 ноя 2022
- MongoDB Compass is a powerful GUI for querying, aggregating, and analyzing your MongoDB data in a visual environment. Compass is free to use and source available, and can be run on macOS, Windows, and Linux. A compass is a device that indicates direction. It is one of the most important instruments for navigation. Magnetic compasses are the most well known type of compass. They have become so popular that the term “compass” almost always refers a magnetic compass.
Big thanks for video ! Ur absolute legend ! =)
Thank you so much my friend
Thankyou
nice thank you!
Thank you my friend
When I installed MongoDB Compass, I didn't get MongoDB in Program files or anywhere in my computer
My friend, even though you didn't see MongoDB in Program Files, it's likely still installed and running in the background. Opening the Services window (search for "services.msc" in the Start menu). If you're still unsure, you can also try running the mongo command in a terminal. If it connects to your MongoDB server successfully, then the server is definitely installed.
Bro can you tell me . If I deploy backend with only local host connection link
yes my friend. your backend application will be able to connect to the MongoDB database using a localhost connection link, and no external access to the MongoDB database will be allowed.
Once we connect, later how to get the disconnection string? We click on connect and choose the disconnect option, then where should one go to get the disconnection string?
No "Disconnection String": MongoDB doesn't have a specific "disconnection string" per se. Connection strings are used for establishing connections, not disconnecting them.
Disconnection Methods: The specific disconnection method depends on your MongoDB environment and client application.
Connection Information Storage: How connection strings are stored varies based on the client or tool being used.
In MongoDB Compass:
Click "Connect" in the menu bar.
Select "Disconnect" from the dropdown.
@@Ashihriisteve Thank you for the info
how do we get a db with host(address) name database password and database
Host Address: The IP address or hostname of the MongoDB server (e.g., 127.0.0.1, localhost, or a domain name).
Port Number: The port MongoDB is listening on (default is 27017).
Database Name: The name of the database you want to access.
Username and Password: If authentication is enabled, the username and password for a user with appropriate permissions. For example like this given below-
mongodb://username:password@host:port/database
how to stop the server
Thanks for the question my friend
If you installed MongoDB as a service:
Press Windows key + R to open the Run dialog.
Type services.msc and press Enter to open the Services app.
Locate the "MongoDB" service and right-click it.
Select "Stop".
If you started MongoDB manually:
Open the Task Manager (Ctrl + Shift + Esc).
Go to the "Details" tab.
Locate the mongod.exe process.
Right-click on it and select "End task".
hello how can i add a folder to mongo?? please respond
Use your preferred MongoDB driver (e.g., pymongo for Python) to interact with the database.
Construct a document with the desired folder name and any additional information.
For child folders, create another document with its name and embed it within the sub-document array of the parent folder document.
# Connect to MongoDB
client = MongoClient("mongodb://localhost:27017/")
db = client["your_database"]
collection = db["your_collection"]
# Define a document for a folder
folder = {"name": "Documents", "info": "Work documents"}
# Create a sub-document for a child folder
sub_folder = {"name": "Reports", "info": "Monthly and quarterly reports"}
# Embed the sub-folder document
folder["sub_folders"] = [sub_folder]
# Insert the folder document (parent with child)
result = collection.insert_one(folder)
print(f"Folder '{folder['name']}' inserted with ID: {result.inserted_id}")
Sir, MongoDb file not there
same here bro, have you found solution to this?
not working on my end
Maybe you have gone to different setting sir