TaoTaoFu 2019-11-19
sudo docker pull influxdb
sudo docker pull mongo
sudo docker run -p 27017:27017 -v xxx:/xxx--name xxxx -d mongo:latest
sudo docker run -d -p8086:8086 --name xxx influxdb:latest
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.json
mongo 127.0.0.1
show databases;
use aaa;
db.xxx.find();
use bbb
db
db.keynes_record.insert({"name":"test"})
show databases;
进入docker容器:
influx
CREATE DATABASE keynes
SHOW DATABASES