📦Setup MySQL

Use a MariaDB/MySQL database in nLogin.

Creating your database:

Pterodactyl

  1. Go to the Databases tab and create your database if it doesn't exist.

  2. Click on the "New database" button to create a new database.

  3. Choose a name for your database and click 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 <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. 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>'

Required data:

You will need four pieces of data generated in the previous step.

  1. IP address.

  2. Database name.

  3. User name.

  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: MySQL

  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
      #verifyServerCertificate: false
      useUnicode: true
      characterEncoding: "utf8"

Last updated