MongoDB
Using MongoDB on your serverlet.
MongoDB is a NoSQL document database that stores data in BSON (Binary JSON) format. Itβs well suited for applications with unstructured or semi-structured data that need a flexible schema and horizontal scalability.
For more details on MongoDB, see the official documentation.
First use
By default, MongoDB is disabled on the serverlet. You can enable it from administration, on the serverletβs Software tab (see Serverlet Control):
Or via a terminal command:
$ app enable mongodbStarting MongoDB:
$ app start mongodbCreating and managing databases
Databases can be created and managed from the UI, or from SSH/CLI using the Futrou DB Manager tool.
Administration (UI)
You can add a new database with a user account in Administration, on the serverletβs Databases tab.
Futrou DB Manager (CLI)
Use the Futrou DB Manager tool to manage databases from the terminal:
Futrou DB Manager
Usage: db {name} list
Usage: db {name} add {database_name} {password}
Usage: db {name} update {database_name} {new_password}
Usage: db {name} del {database_name}
Supported databases: mariadb, mongodb, postgresql
Example: db mongodb listCommands:
db mongodb listβ lists all databasesdb mongodb add database_name passwordβ creates a new database with a user and passworddb mongodb update database_name new_passwordβ updates the password for a databasedb mongodb del database_nameβ deletes a database
Example:
$ db mongodb add moje_db tajne_hesloControl
Control MongoDB with:
$ mongoshConfiguration
All MongoDB configuration is stored in the /srv/config/mongodb/mongod.conf file.
Last updated
