My machine is 5 years old, so I need a new laptop, and I have always heard that Macs are much easier to develop on. To date I've developed on a Windows machine (most recently a Surface Pro) using XAMPP to create a localhost. That should result in the following databases being displayed: admin 0.I am an entrepreneur and web developer with an existing app in the cloud for 10 years running on a Linux server with PHP and MySQL (I'm self-taught, so have gaps in my knowledge). Once connected, you can enter as many commands as you need.įor starters, enter the following command to display a list of databases: show dbs This means that it’s ready to accept your commands. That should display a bunch of text, and at the end, you should see the following prompt: > That connects a mongo shell to the running MongoDB instance. Now that MongoDB is up and running, we can connect to it and start using it.įrom a new Terminal window, enter the following: mongo You should see your mongod process in the output. If you started MongoDB as a background process: ps aux | grep -v grep | grep mongod You should see the service mongodb-community listed as started. If you started MongoDB as a MacOS service: brew services list You can check that MongoDB is running by issuing one of the following commands, depending on whether it’s running as a MacOS service or a background process. To stop a mongod running as a background process, connect to the mongod from the mongo shell, and issue the shutdown command. To run it as manually as a background process, enter the following command: mongod -config /usr/local/etc/nf -fork You can stop it like this: brew services stop Option 2 To run it as a MacOS service, enter the following command: brew services start
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |