1. 进入到mongo安装目录下bin文件夹,执行下面命令
./mongorestore -h 127.0.0.1:27017 -u root -p 123456 -d test --authenticationDatabase admin /data/test
root: 用户名
123456:密码
test:数据库名
1. 进入到mongo安装目录下bin文件夹,执行下面命令
./mongorestore -h 127.0.0.1:27017 -u root -p 123456 -d test --authenticationDatabase admin /data/test
root: 用户名
123456:密码
test:数据库名