sudo docker pull influxdb
sudo docker pull mongomongodb
sudo docker run -p 27017:27017 -v xxx:/xxx--name xxxx -d mongo:latest
sudo docker run -d -p8086:8086 --name xxx influxdb:latestdocker
mongo 127.0.0.1
use admin;
db.createUser({user: "xxx", pwd: "xxx", roles: [{ role: "root", db: "admin" }]});
db.getUser("xxx")數據庫
進入mongo容器:
mongoimport -d aaa -c xxx.jsonjson
mongo 127.0.0.1
show databases;
use aaa;
db.xxx.find();flux
use bbb
db
db.keynes_record.insert({"name":"test"})
show databases;部署
進入docker容器:
influx
CREATE DATABASE keynes
SHOW DATABASESget