|
|
Configuration is pretty straight forward however I will point out some important details regarding using SQLite and MySQL.
|
|
|
|
|
|
Important things to keep in mind is that MySQL supports multiple connections to the database and SQLite only supports 1 concurrent connection because it is a _file_ that contains a database. In future versions of BlockSuite, there will be a WebUI that will integrate with the plugin and will only work if you use MySQL. Because of this, setup MySQL instead - SQLite can work but only for a while and as an easy setup.
|
|
|
|
|
|
---
|
|
|
# MySQL
|
|
|
In order to use MySQL, you must first create the database in your MySQL instance.
|
|
|
- If you are using a shared host, you can do this from the management portal.
|
|
|
- If you are using a dedicated host or VPS, you must manually create the database which I can provide instructions below.
|
|
|
|
|
|
## MySQL Setup
|
|
|
**NOTE**: Again, this is only for those of you that are using a dedicated host or VPS, if you are using a shared host like BisectHosting or Shockbyte, they have their own instructions!
|
|
|
|
|
|
**1. Connect to your MySQL Instance.**
|
|
|
```
|
|
|
sudo mysql
|
|
|
```
|
|
|
**2. Create the database you will use for BlockSuite.**
|
|
|
```
|
|
|
create database blocksuite;
|
|
|
```
|
|
|
**3. Create the BlockSuite database user.**
|
|
|
```
|
|
|
create user blocksuite@localhost identified by 's3cur3P@s5w0rd!';
|
|
|
```
|
|
|
**Important**: "localhost" suggests that the database user will be logging in locally, aka. from the same machine assuming your Minecraft Server is installed in the same machine as the MySQL Server. If your MySQL Server are installed on different server elsewhere, replace "localhost" with the IP of the Minecraft Server. Otherwise, logging in will fail.
|
|
|
|
|
|
**4. Grant BlockSuite user permissions to the BlockSuite database.**
|
|
|
```
|
|
|
grant all privileges on blocksuite.* to blocksuite@localhost;
|
|
|
```
|
|
|
And finally
|
|
|
```
|
|
|
flush privileges;
|
|
|
```
|
|
|
|
|
|
## Example MySQL Config
|
|
|
```
|
|
|
# Available Database types, recommended
|
|
|
# and preferred method is MySQL
|
|
|
# 1) mysql
|
|
|
# 2) sqlite
|
|
|
database:
|
|
|
type: mysql
|
|
|
# only for SQLite
|
|
|
dbfile: blocksuite.db
|
|
|
# only for MySQL
|
|
|
user: blocksuite
|
|
|
password: "s3cur3P@s5w0rd!"
|
|
|
host: localhost
|
|
|
port: 3306
|
|
|
database: blocksuite
|
|
|
debug: false
|
|
|
# DO NOT TOUCH
|
|
|
version: 1
|
|
|
```
|
|
|
---
|
|
|
# SQLite
|
|
|
SQLite is super simple and is the default setup when first running BlockSuite. Just make sure that your `dbfile` ends in ".db".
|
|
|
|
|
|
## Example SQLite Config
|
|
|
```
|
|
|
# Available Database types, recommended
|
|
|
# and preferred method is MySQL
|
|
|
# 1) mysql
|
|
|
# 2) sqlite
|
|
|
database:
|
|
|
type: sqlite
|
|
|
# only for SQLite
|
|
|
dbfile: blocksuite.db
|
|
|
# only for MySQL
|
|
|
user: blocksuite
|
|
|
password: secure
|
|
|
host: localhost
|
|
|
port: 3306
|
|
|
database: blocksuite
|
|
|
debug: false
|
|
|
# DO NOT TOUCH
|
|
|
version: 1
|
|
|
``` |
|
|
\ No newline at end of file |