1. sudo mongod
命令启动MongoDB失败
·报错
macOS Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused
2.解决
·检查配置path
· open .bash_profile
打开文件,检查以下配置有没有冲突
export PATH=/usr/local/mongodb