Setting up a database

Sonar can be connected to a database to retain verified player data even after server restarts.

IP addresses are stored in plain text, so ensure your database is secure.

Defines the type of database used by Sonar. Options include NONE, MYSQL, MARIADB, and H2. Default: NONE

type: NONE

Specifies the file name for the H2 database stored in Sonar's plugin directory. Default: verified_players

filename: verified_players

The host address for SQL database authentication. Default: localhost

host: localhost

The port number for SQL database authentication. Default: 3306

port: 3306

The name of the SQL database. Default: sonar

name: sonar

The username and password are used by Sonar to authenticate the connection to the database. The connection will fail if no username or password are given.

username: 'my_username'
password: 'my_p@ssw0rd!'

The number of days Sonar should retain verified players in the database. Default: 5

maximum-age: 5

Last updated