Links
📦

Setup MySQL

Follow the steps below to set up MySQL on nLogin.

Creating your database

Pterodactyl

Go to the Databases tab and create your database if it doesn't exist.
Step 1
Click on the "New database" button to create a new database.
Step 2
Choose a name for your database and click the "Create database" button.
Step 3

MySQL shell

  1. 1.
    Use the command sudo mysql (or sudo mariadb) to enter the MySQL shell.
  2. 2.
    Set the InnoDB engine in the current session. SET storage_engine=InnoDB
  3. 3.
    Create the database with the desired name. MySQL 8.0 CREATE DATABASE <nome da database> CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci Other versions: CREATE DATABASE <nome da database> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
  4. 4.
    Grant the user basic privileges on the newly created database. GRANT ALTER, DROP, SELECT, INSERT, UPDATE, DELETE ON <database name> TO <user name>@'localhost' IDENTIFIED BY '<user's password>'

Gathering the information

You will need to have four pieces of information from the database:
  • IP address.
  • Database name.
  • User name.
  • User password.

Entering in nLogin

Go to the configuration file nLogin/config.yml and look for the "Database" section. Enter the information in the MYSQL key, like the example below.
Don't forget to change the database-type option to "MYSQL"!
# ___ _ _
# / \__ _| |_ __ _| |__ __ _ ___ ___
# / /\ / _` | __/ _` | '_ \ / _` / __|/ _ \
# / /_// (_| | || (_| | |_) | (_| \__ \ __/
# /___,' \__,_|\__\__,_|_.__/ \__,_|___/\___|
#
# Database settings.
Database:
# Defines the type of database. Valid values: [SQLITE or MYSQL].
database-type: MYSQL
MYSQL:
# MySQL IP address.
connection-address: "55.194.141.68:3306"
# MySQL database name.
connection-database: "s1_proxy"
# MySQL user name.
connection-user: "u1_e6N4G5cmlW"
# MySQL user password.
connection-password: "zkH40Jqh#lT*JNw@7dc9LsOw"
# Connection properties
properties:
#useSSL: false
#verifyServerCertificate: false
useUnicode: true
characterEncoding: "utf8"