I am using linux zorin os. Recently I installed mongoDB in my system using these commands :
-
For import the Public Key :
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg
-
For Creating the Source List :
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
-
For updating the Package Database :
sudo apt update
-
For starting the MongoDB Service :
sudo systemctl start mongod
-
For enable MongoDB to Start on Boot :
sudo systemctl enable mongod
-
For enabling MongoDB to Start on Boot :
sudo systemctl enable mongod
But I am facing the problem :
I have used online contents and chatgpt but i can not find any solution. After running mongosh
command, MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017
error occurred. I used online contents and chatgpt but failed to solve the problem.
2