Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xyrapanel/panel/llms.txt
Use this file to discover all available pages before exploring further.
What are Database Hosts?
Database hosts are MySQL or MariaDB servers that provide databases for game servers. When users create a database for their server, XyraPanel provisions it on one of your configured database hosts. Use cases:- Store player data (Minecraft plugins, game stats)
- Persistent configuration (web-based admin panels)
- Cross-server data sharing
- Leaderboards and economies
Prerequisites
Before adding a database host:-
MySQL/MariaDB Server
- Running MySQL 5.7+ or MariaDB 10.3+
- Accessible from the panel and Wings nodes
- Configured for remote connections
-
Administrative User
- User with
CREATE,DROP,ALTERprivileges - Ability to create new databases and users
- Remote connection permissions
- User with
Adding a Database Host
Add new host
Click Add Database Host and configure:Name (required)
- Friendly identifier
- Example: “Main MySQL Server”, “EU Database 1”
- IP address or domain name
- Example:
mysql.example.com,192.0.2.10
- MySQL port, typically
3306
- MySQL user with admin privileges
- Example:
pterodactyl,dbadmin
- Password for the MySQL user
- Stored encrypted in the panel database
- Database to connect to for operations
- Typically leave blank or use
mysql
- Limit on databases this host can create
- Leave blank or
0for unlimited
Configuring MySQL Server
Remote Access
Allow connections from the panel and nodes:MySQL Configuration
Edit/etc/mysql/mysql.conf.d/mysqld.cnf:
Firewall Rules
Allow MySQL port:Managing Database Hosts
Viewing Databases
The host list shows:- Name: Host identifier
- Hostname:Port: Connection endpoint
- Username: MySQL user
- Databases: Current count / Maximum limit
Testing Connection
Click the test icon to verify: ✅ Connection successful❌ Connection failed (error details shown) Common errors:
Connection refused: MySQL not running or firewall blockingAccess denied: Incorrect credentials or missing privilegesUnknown host: Hostname DNS resolution failed
Editing Hosts
You can update:- Name (display only)
- Hostname/port (use caution, breaks existing databases)
- Credentials (if rotated)
- Max databases limit
Deleting Hosts
Database Creation
When a user creates a database for their server:-
Panel selects a host
- Chooses host with available capacity
- Prefers hosts on the same node (if configured)
-
Creates database
-
Creates user
-
Grants permissions
-
Returns credentials
- Database name:
s123_mydb - Username:
s123_user - Password: (auto-generated)
- Host:
mysql.example.com:3306
- Database name:
Database Naming
Databases are prefixed with the server ID:Node-Specific Hosts
Assign a database host to a specific node:- Reduced latency (database close to server)
- Geographic data residency
- Load distribution
- Servers on that node use this host by default
- Falls back to general hosts if unavailable
Monitoring
Database Capacity
Track usage per host:Max Databases to prevent overloading.
Connection Pooling
MySQLmax_connections should accommodate:
- Panel connections (1-2 per request)
- Game server connections (varies by game)
- Admin tools (phpMyAdmin, etc.)
max_connections = 500 for headroom.
Backup and Maintenance
Automated Backups
Schedule regular MySQL dumps:Database Maintenance
Optimize tables monthly:Security Best Practices
Network Security
✅ Isolate database server- Use private network between panel/nodes and database
- Firewall rules limiting access to specific IPs
- Disable public internet access
- Exposing MySQL to the internet
- Using default passwords
- Running MySQL on the same server as game servers
User Privileges
✅ Minimal permissionsPassword Management
✅ Strong passwords- Panel-generated passwords are cryptographically random
- Store MySQL root password securely
- Rotate credentials periodically
- Don’t use simple passwords for admin user
- Don’t reuse passwords across environments
Troubleshooting
Cannot connect to database host
Check:-
MySQL is running:
-
Port is listening:
-
Firewall allows connections:
-
Credentials are correct:
Database creation fails
Common causes:- MySQL user lacks
CREATEprivilege - Max databases limit reached
- Disk space full on MySQL server
- Invalid database name characters
Game server can’t connect to database
Verify:-
Database exists:
-
User can connect:
-
Server has network access:
Performance Tuning
InnoDB Buffer Pool
Set to 70-80% of available RAM:Query Cache (MySQL 5.7)
Connection Limits
Related Resources
Server Databases
How users create and manage databases
Nodes
Configure node-specific database hosts