Setting up MySQL
Create a MySQL or MariaDB database for the Skyport panel.
Skyport uses SQLite by default, which requires zero setup. If you prefer MySQL or MariaDB for a larger deployment, follow this guide.
1. Install MariaDB
Section titled “1. Install MariaDB”sudo apt updatesudo apt install -y mariadb-serversudo systemctl enable --now mariadb2. Create a database and user
Section titled “2. Create a database and user”sudo mariadbCREATE DATABASE skyport;CREATE USER 'skyport'@'localhost' IDENTIFIED BY 'your-password';GRANT ALL PRIVILEGES ON skyport.* TO 'skyport'@'localhost';FLUSH PRIVILEGES;EXIT;3. Configure the panel
Section titled “3. Configure the panel”Update .env:
DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=skyportDB_USERNAME=skyportDB_PASSWORD=your-passwordOr use the setup command:
php artisan environment:setup \ --db-connection=mysql \ --db-host=127.0.0.1 \ --db-port=3306 \ --db-database=skyport \ --db-username=skyport \ --db-password=your-password \ --no-interaction4. Run migrations
Section titled “4. Run migrations”php artisan migrate --force5. Verify
Section titled “5. Verify”php artisan tinker --execute "DB::connection()->getPdo(); echo 'OK';"Recommendation
Section titled “Recommendation”Keep MariaDB on a private interface. Do not expose port 3306 to the internet.