Skip to content

Latest commit

 

History

History
122 lines (85 loc) · 3.63 KB

File metadata and controls

122 lines (85 loc) · 3.63 KB

Install MariaDB

The minimum required version is 10.11!

DOWNLOAD FOR WINDOWS: https://mariadb.com/downloads/?utm_source=header&utm_medium=website
Download the MariaDB Community(FREE) version 10.11.13-GA for Windows.

WINDOWS: https://mariadb.com/kb/en/installing-mariadb-msi-packages-on-windows/
(Tuturial on version 10.6 - please download 10.11)

LINUX: https://ubuntushell.com/install-mariadb-on-ubuntu/

The MariaDb installation will ask to set up a password for the root user. This password can be anything you like.

Initial Set Up

Once installed you need to run a least minimum initialization of your database server:

  • Create a database
  • Create a user (representing the Signum Node)
  • Give user access to the database

Run the mariadb (with admin rights, i.e. sudo mariadb on linux/mac) command and you should see something like this

user@computer:~$ sudo mariadb
[sudo] password for user: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 42
Server version: 11.2.2-MariaDB-1:11.2.2+maria~ubu2004 mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

Within this bash run the following SQL commands:

-- Create the database
CREATE DATABASE IF NOT EXISTS signum;

-- Create the user (choose another password if you want)
CREATE USER IF NOT EXISTS 'signumnode'@'localhost' IDENTIFIED BY 's1gn00m_n0d3';

-- Grant ownership of the database to the user
GRANT ALL PRIVILEGES ON signum.* TO 'signumnode'@'localhost';
FLUSH PRIVILEGES;

Configure Node

Create a file named node.properties in the ./conf directory. And add the following

In node.properties file:

DB.Url=jdbc:mariadb://localhost:3306/signum
DB.Username=signumnode
# The chosen password
DB.Password=s1gn00m_n0d3

For Test Net

Testnet is usually only for slightly advanced users. The testnet allows you "play" around without having to buy/get real SIGNA. Ask the community to get some "play money" (TSIGNA).

If you switch often between Main and Testnet networks it might be interesting to set up MariaDB for both networks. Just create another database and grant the Signum Node access to that database. We assume that the user signumnode exists already.

-- Create the database
CREATE DATABASE signum_testnet;

-- Grant ownership of the database to the user
GRANT ALL PRIVILEGES ON signum_testnet.* TO 'signumnode'@'localhost';
FLUSH PRIVILEGES;

Then you can switch between both networks by just changing the properties accordingly:

In node.properties file:

# Tell Signum Node to use Testnet
node.network = signum.net.TestnetNetwork
DB.Url=jdbc:mariadb://localhost:3306/signum_testnet
DB.Username=signumnode
DB.Password=s1gn00m_n0d3

Faster Sync time

Do reduce I/O times and though causing significant speedup while syncing, one may run the following command:

SET GLOBAL innodb_flush_log_at_trx_commit = 0;

See more details here.

Performance Optimisation

If you have a server or PC with > 8GB RAM, you should set the following values in the my.cnf or my.ini file of the MySQL Server:

innodb_buffer_pool_size=3G
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=256MB

You need to restart the service after setting the values.

You can check the variables after a restart with:

SHOW VARIABLES LIKE 'innodb%buffer%';
SHOW VARIABLES LIKE 'innodb_flush_log_at_trx_commit';