2 SQLite Storage
Joshinken edited this page 2024-03-19 12:49:08 +01:00

This option is one of the 4 storage options of Dynmap. It is an advanced storage layout, but easy to configure as it doesn't need a seperate service to run the storage. The downside to SQLite is that if an entry of the database is corrupted, the whole database is not readable, because it is stored in one big file.

If using Spigot or Paper skip to the step: Configurating configuration.txt

When using Forge or Fabric the by kosma created mods are needed to add the SQL connector.

The SQlite integration is handled by: Kosmolot's SQlite mod

Configuring configuration.txt

The last step is to configure the dynmap configuration.txt so it connects to the database and uses it for storage.

Change the following part of the configuration.txt:

storage:
  # Filetree storage (standard tree of image files for maps)
  type: filetree
  # SQLite db for map storage (uses dbfile as storage location)
  #type: sqlite
  #dbfile: dynmap.db
  # MySQL DB for map storage (at 'hostname':'port' with flags "flags" in database 'database' using user 'userid' password 'password' and table prefix 'prefix')
  #type: mysql
  #hostname: localhost
  #port: 3306
  #database: dynmap
  #userid: dynmap
  #password: dynmap
  #prefix: ""
  #flags: "?allowReconnect=true&autoReconnect=true"

to:

SQlite Example (Click to expand)
storage:
  # Filetree storage (standard tree of image files for maps)
  #type: filetree <- DONT FORGET TO COMMENT THIS OUT
  # SQLite db for map storage (uses dbfile as storage location)
  type: sqlite
  dbfile: dynmap.db
  # MySQL DB for map storage (at 'hostname':'port' with flags "flags" in database 'database' using user 'userid' password 'password' and table prefix 'prefix')
  #type: mysql
  #hostname: localhost
  #port: 3306
  #database: dynmap
  #userid: dynmap
  #password: dynmap
  #prefix: ""
  #flags: "?allowReconnect=true&autoReconnect=true"

Now save the file and start the minecraft server, check if dynmap succesfully created and connected to the SQLite database.