how to stop MongoDB from the command line
how to stop MongoDB from the command line
stop mongod
https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/#stop-mongod-processes
# start
# server
$ mongod --dbpath /System/Volumes/Data/data/db
# stop
$ mongod --shutdown
# Ctrl + C
# kill <mongod process ID>
# Shut down the mongod from the mongo shell using the db.shutdownServer() method as follows:
> use admin
> db.shutdownServer()


https://stackoverflow.com/questions/11774887/how-to-stop-mongo-db-in-one-command/11777141
stop mongodb
https://docs.mongodb.com/manual/reference/command/shutdown
https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes
$ which mongod
# /usr/local/mongodb/bin/mongod
# start
./mongod
# stop
$ db.adminCommand({ shutdown: 1 })
$ db.adminCommand({ shutdown: 1, force: true })
$ use admin
$ db.shutdownServer()
$ mongod --shutdown
$ kill <mongod process ID>
$ kill -2 <mongod process ID>
# WARNING
# Never use kill -9 (i.e. SIGKILL) to terminate a mongod instance.
SIGKILL / 杀人狂
kill -9 PID

https://stackoverflow.com/questions/11774887/how-to-stop-mongo-db-in-one-command
# MacOS PID kill
$ top
env
https://flutter.dev/docs/get-started/install/macos#update-your-path
$ which .zshrc
$ which flutter
# edit $HOME/.zshrc
$ cat $HOME/.zshrc
$ vim $HOME/.zshrc
$ code . $HOME/.zshrc
export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
$ echo $PATH
# refresh
$ source $HOME/.zshrc



$ echo $PATH
# refresh
$ source $HOME/.zshrc
$ which mongod
$ code .zshrc
export PATH=/usr/local/mongodb/bin:$PATH
$ ps -ef | grep mongod
$ ps -ef | grep mongo

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/xgqfrms-mbp/.oh-my-zsh"
# tree bug
source ~/.bash_profile
# Flutter China
export PUB_HOSTED_URL=https://pub.flutter-io.cn
# flutter PATH & zsh
export PATH="$PATH:/Users/xgqfrms-mbp/Documents/Flutter/flutter/bin"
# mongodb ENV 2020.04.23
export PATH=/usr/local/mongodb/bin:$PATH
# VS Code & zsh bug
# export PATH="\$PATH:/Users/xgqfrms-mbp/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
function code {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code"
else
local argPath="$1"
[[ $1 = /* ]] && argPath="$1" || argPath="$PWD/${1#./}"
open -a "Visual Studio Code" "$argPath"
fi
}
# nvm config
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
refs
MongoDB shell
https://www.cnblogs.com/xgqfrms/p/13320793.html
MongoDB & macOS
https://www.cnblogs.com/xgqfrms/p/9770091.html
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
how to stop MongoDB from the command line的更多相关文章
- How to build .apk file from command line(转)
How to build .apk file from command line Created on Wednesday, 29 June 2011 14:32 If you don’t want ...
- Can't use Subversion command line client: svn Probably the path to Subversion executable is wrong. Fix it.
1.最近使用SVN工具时,Checkout出项目到本地后后,然后将其导入到Intellij idea中开发,在提交svn代码的时候,出现这样的错误:Can't use Subversion comma ...
- How to Use Android ADB Command Line Tool
Android Debug Bridge (adb) is a tool that lets you manage the state of an emulator instance or Andro ...
- Chrome-Console( Command Line API Reference)
来源于:https://developers.google.com/web/tools/chrome-devtools/console/command-line-reference The Comma ...
- logoff remote desktop sessions via command line tools
This trick I learned from my one of ex-college. In Windows servers, only two remote desktop session ...
- 使用intellij的svn时提示出错: Can't use Subversion command line client: svn.Errors found while svn working copies detection.
使用Intellij的svn时提示出错:Can't use Subversion command line client: svn. Errors found while svn working co ...
- ubuntu16.04安装virtualbox5.1失败 gcc:error:unrecognized command line option ‘-fstack-protector-strong’
系统:ubuntu16.04.1 软件:Virtualbox-5.1 编译器:GCC 4.7.4 在如上环境下安装Vbx5.1提示我在终端执行/sbin/vboxconfig命令 照做 出现如下err ...
- Linux Command Line 笔记(1)
Yunduan CUI graphical user interfaces make easy tasks easy, while command line interfaces make diffi ...
- Can't use Subversion command line client:svn
在Intellij IDEA里checkout东西时出先这个错误提示:Can't use Subversion command line client:svn Subversion command l ...
随机推荐
- try-catch 异常捕获学习
#include <iostream> #include <string> #include <vector> #include <stdexcept> ...
- Python中,单引号,双引号,三引号的使用区别与原因
先说1双引号与3个双引号的区别,双引号所表示的字符串通常要写成一行如:s1 = "hello,world"如果要写成多行,那么就要使用/ ("连行符")吧,如s ...
- Springboot 项目部署到服务器上
项目部署到服务器上,有两种方式,一种 jar 包,一种 war 包 jar包 部署时,后续的域名配置,SSL证书等在nginx中配置 war包 部署时,后续的域名配置可以在tomcat中配置就好,修改 ...
- 七:Spring Security 前后端分离登录,非法请求直接返回 JSON
Spring Security 前后端分离登录,非法请求直接返回 JSON 解决方案 在 Spring Security 中未获认证的请求默认会重定向到登录页,但是在前后端分离的登录中,这个默认行为则 ...
- HTML5 网页制作技巧
本文总结自由人民邮电出版社出版的<HTML.CSS.Javascript网页制作>. 总结进行学习,并分享给同样编写HTML5的朋友. 1:背景音乐的添加 <embed src=&q ...
- Prometheus自定义监控内容
Prometheus自定义监控内容 一.io.micrometer的使用 1.1 Counter 1.2 Gauge 1.3 Timer 1.4 Summary 二.扩展 相关内容原文地址: 博客园: ...
- Redis集群搭建,伪分布式集群,即一台服务器6个redis节点
Redis集群搭建,伪分布式集群,即一台服务器6个redis节点 一.Redis Cluster(Redis集群)简介 集群搭建需要的环境 二.搭建集群 2.1Redis的安装 2.2搭建6台redi ...
- UML——交互图(序列图+协作图)
交互图(interaction diagram):是协作图=通信图UML2.0以后的叫法=合作图=(Collaboration /Communication Diagram)以及序列图=顺序图=时序图 ...
- springboot注解开发
可以毫不夸张地说,这篇文章介绍的 Spring/SpringBoot 常用注解基本已经涵盖你工作中遇到的大部分常用的场景.对于每一个注解我都说了具体用法,掌握搞懂,使用 SpringBoot 来开发项 ...
- JD价格监控【docker版】
快过年了,准备买些年货,于是频繁刷购物网站对比价格,搞得还是挺头大的.我想能不能做个应用抓取实时价格并在低于预期价格后进行提醒,于是就有了本篇文章.本文主要分享怎么将本地项目打包成镜像并推送到dock ...