Instalamos mongoDb, base de datos no-relacional, trabaja con formato json
-> MongoDB Tutorials
-> Documentación de peticiones
mongo
show dbs
use shop
db.products.find()
{ "_id" : ObjectId("616748bb5ac107af1c39fd36"), "price" : 399, "name" : "macBook", "picture" :
"dfs.png", "category" : "computers", "description" : "El portalit chulo", "__v" : 0 }
db.runCommand({"drop": "users"}) //Borra la tabla usuarios
show collections //muestra las tablas
Crear directorio de trabajo:
Stop the mongod service: sudo systemctl stop mongod created new directory with required permissions. sudo chown -R mongodb:mongodb /var/lib/mongodb Change directory path (db path) in the /etc/mongodb.conf point to the new location. Start the mongodb service. And sync started automatically.