Storage setup¶
DKFriends uses the McNative storage technology and supports all storage types supported by McNative. McNative storage technology is centralized storage integration for all supported plugins, it brings various performance and time benefits. Read more about it here
Location: ./plugins/McNative/storage.yml
The configuration consists of two parts, the drivers that connect to the database server which are shared between the plugins, and the database part, where you can configure the database for each plugin.
Driver settings¶
You can use the same driver for multiple plugins, see all supported types and configuration options in the McNative documentation. Only one sql setup is covered on this page.
mysqlThe internal name of the driver (Used below in the databasedriverNamesetting)addressThe address of your database serverusernameThe username to authenticatepasswordThe password to authenticatedriverThe used driver (See all available drivers in the McNative docs)nameThe internal driver name (Used for logging and separation)dialectNameThe sql dialect (Supported: MySQL, MariaDB, MS-SQL, PostgreSQL)useSSLThe above configured driver to use
Example:
drivers:
mysql:
address: '127.0.0.1:3306'
username: 'mcnative'
password: '1234'
driver: 'net.pretronic.databasequery.sql.driver.SQLDatabaseDriver'
name: 'MySQL'
dialectName: 'MySQL'
useSSL: false
Database settings¶
After the driver configuration, you have to set up a database for DKFriends in the databases section.
pluginNameThe plugin name, useDKFriendsnameThe internal database name, usedefaultdatabaseThe name of your database (e.g.DKFriends)driverNameThe above configured driver to use
Example:
databases:
- pluginName: 'DKFriends'
name: 'default'
database: 'DKFriends'
driverName: 'default'
Database settings¶
A complete configuration may look something like this (Only DKFriends):
drivers:
mysql:
address: '127.0.0.1:3306'
username: 'mcnative'
password: '1234'
driver: 'net.pretronic.databasequery.sql.driver.SQLDatabaseDriver'
name: 'MySQL'
dialectName: 'MySQL'
useSSL: false
databases:
- pluginName: 'DKFriends'
name: 'default'
database: 'DKFriends'
driverName: 'mysql'