A database API for use with Tracker. Currently only supports PostgreSQL.
You may download Database from Modrinth or from GitHub Releases.
- You'll want to be familiar with managing PostgreSQL or similar databases.
- You'll have to be willing to configure the mod initially so it'll work.
- You should be familiar with securing databases to avoid misuse.
- Install PostgreSQL using your favourite method.
- Debian:
apt install postgresql
- Fedora/RHEL:
dnf install postgresql-server postgresql-contrib
- Older versions of Redhat Enterprise Linux and derivatives may require the use of
yum
in place ofdnf
. - This require you to run
sudo postgresql-setup --initdb --unit postgresql
to setup PostgreSQL.
- Older versions of Redhat Enterprise Linux and derivatives may require the use of
- Arch Linux:
pacman -S postgresql
- This requires you to run
sudo -u postgres initdb -D /var/lib/postgres/data
orsu -l postgres -c "initdb -D /var/lib/postgres/data"
to setup PostgreSQL.
- This requires you to run
- Some distributions, such as Fedora and Arch Linux may require you to run
systemctl enable --now postgresql
to start the database and to make it restart on system reboot.
- Debian:
- Create a user and database for Plymouth to use.
- If you prefer to use
psql
directly, you can use the following SQL to get this going. You may need to use thepostgres
account, which you can access by usingsudo -u postgres psql
.CREATE USER plymouth WITH PASSWORD 'Insert a password for the database here. Be sure to escape your \' as necessary.'; CREATE DATABASE plymouth WITH OWNER = plymouth;
- Alternatively, you can use the following two commands. With the
-P
option, you'll be prompted to input a password. You may need to use thepostgres
account, which you can access by prependingsudo -u postgres
, or by going into the account withsu postgres
.createuser plymouth -P createdb plymouth -O plymouth
- If you prefer to use
- Drop the mod into the mods folder of your server along with Common then boot it up. A configuration file will be
created at
config/plymouth.db.properties
for you to edit. - Edit the config so that the database, username and password matches what you've used for the database.
- Reference
url=jdbc\:postgresql\://127.0.0.1\:5432/database user=username password=password
- From the example so far.
url=jdbc\:postgresql\://127.0.0.1\:5432/plymouth user=plymouth password=Insert a password for the database here. Be sure to escape your ' as necessary.
- Reference
- Start the server for reals this time. The database handler will bootstrap the database itself with the tables necessary to function.