Skip to main content

📦 Configuring MySQL

Use a MariaDB/MySQL database in nLogin.

Creating your database

Pterodactyl

  1. Go to the "Databases" tab to create a database.
  2. Click on the "New database" button.
  3. Choose a name for your database. Then click on the "Create database" button.

MySQL shell

  1. Use the command sudo mysql (or sudo mariadb) to enter the MySQL shell.
  2. Set the InnoDB engine in the current session. SET storage_engine=InnoDB
  3. Create the database with the desired name.
  • MySQL 8.0

    • CREATE DATABASE <database name> CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci
  • Other versions:

    • CREATE DATABASE <database name> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
  1. Grant privileges to the user in the newly created database.

    • GRANT ALTER, DROP, SELECT, INSERT, UPDATE, DELETE ON <database name> TO <user name>@'localhost' IDENTIFIED BY '<user password>'

Credentials required

You will need four credentials retrieved in the previous step.

  1. IP address.
  2. Database.
  3. Username.
  4. Password.

Configuration

Go to the file /plugins/nLogin/config.yml. Look for the "database" section and enter the information in the "hostname", "database", "username" and "password" fields, as in the example below.

#      ___      _        _
# / \__ _| |_ __ _| |__ __ _ ___ ___
# / /\ / _` | __/ _` | '_ \ / _` / __|/ _ \
# / /_// (_| | || (_| | |_) | (_| \__ \ __/
# /___,' \__,_|\__\__,_|_.__/ \__,_|___/\___|

# Database settings.
database:
# Sets the type of database used.
#
# - Options available:
# |=> MariaDB
# |=> MySQL
# |=> SQLite
type: MariaDB

remote:
# Defines MariaDB/MySQL information.
# - Tutorial for installation: https://docs.nickuc.com/nlogin/mysql
hostname: "localhost:3306"
database: "nlogin"
username: "root"
password: ""

# Set the connection properties.
# - Don't change this information if you don't know what you are doing!
properties:
#useSSL: false
#sslMode: disable
#verifyServerCertificate: false
useUnicode: true
characterEncoding: "utf8"
Support

Need help? Contact our support team if you still have questions.