Database

Documentation on how to setup Database.

If you're coming from version older than 1.7.6 you first need to Migrate Database to new format.

MongoDB and SQLite are the recommended database types

In your Configuration File you can choose between 3 types of Database:

  • SQLite (sqlite) - default

  • MySQL (mysql)

  • MongoDB (mongo)

Out of all of these, only one of them doesn't require any special installation/setup and that's SQLite. Both MySQL & MongoDB requires you to have database created somewhere and details of it.

SQLite

SQLite is the default database type and doesn't require anything external. You just need to set database.type config field to sqlite and to the start bot.

MongoDB

To setup MongoDB, you need MongoDB Connection URI which you need to paste into database.mongo.uri field in config.yml.

MongoDB Connection URI Format:

mongodb+srv://<username>:<password>@<host>/<database>

You can click button below to see how to get Mongo Database free of charge from MongoDB Atlas:

pageMongo Database

MySQL

The details you need for MySQL are: host, <port>, user, password & database name.

After you've obtained all of these details, open config.yml, scroll to the database section and fill in mysql section with those details.

Last updated