Mongo –eval “db.getSiblingDB(‘admin’).shutdownServer()”Īnd when you need to stop the server, just use stop. In order to solve this issues, just create another file called stop.bat, that we save on the same bon dir ofmongoDB with the Off (al least, I suffer some problems, and that’s why I create this scripts). However, sometimes, after using this method, you can have some problems to start it again. To end with, I would like to comment that if you need tos stop a MongoDB server, on the official documentation for Windows you can use CTRL+C on the mongod server console, and it’s anought. mongo./ mongo MongoDB shell version: 3.0.6 MongoDB shell version : 3.0. Log in to the default database using a username and password. As a remainder, watch out for the path of your confi file. To connect to the MongoDB server with a username and password, you must use the ‘ username:email protected/dbname ‘ format, ‘username’ for the username and ‘password’ for the password. Now, you can save it as start.bat in the same path bin of MongoDB, and this way, just with one clic, you can start up the server and a MongoDB console. bat script to speed up everything, and reducing the possibility of generating errors. On previous post I have explained about how to config a MongoDB server, how to start up a server, … I think it’s good to create a small. ![]() For the good or for the bad, you can learn to work with MongoDB on your own PC or laptop without installing anything, just by having located the path where MongoDB server is, a config file and a path where data is stored.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |