brew安装mongodb报错Error: No available formula with the name 'mongodb'
原因:MongoDB不再是开源的了,并且已经从Homebrew中移除 #43770
设定: $ brew tap mongodb/brew
安装:
$ brew install mongodb-community@4.2
启动:$ brew services start mongodb-community
转自
https://www.cnblogs.com/zgaspnet/p/11769704.html
1. 在远程dump时:
备份数据 mongodump -d legal_v -c tweets_filtered -o ./ # -o后指定目标目录 -d 数据库名 -c collection名
2. scp Bajon到本地后:
恢复数据 mongorestore -h localhost -d tweets_filtered ./bason #bason是文件所在目录,回到bason文件上一级目录执行该行命令
3. 删除某个collection:
show dbs
use "my_dbs&