📦 Configuring MySQL
Use a MariaDB/MySQL database in nLogin.
Creating your database
Pterodactyl
- Go to the "Databases" tab to create a database.
- Click on the "New database" button.
- Choose a name for your database. Then click on the "Create database" button.
MySQL shell
- Use the command
sudo mysql
(orsudo mariadb
) to enter the MySQL shell. - Set the InnoDB engine in the current session.
SET storage_engine=InnoDB
- 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
-
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.
- IP address.
- Database.
- Username.
- 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.