Database Hosts
Database hosts are MySQL/MariaDB servers that BadgerPanel provisions game server databases on. When a user creates a database for their server, BadgerPanel connects to the configured host and creates a new database with isolated credentials.
Adding a Database Host
- Navigate to Admin > Database Hosts and click Add Host.
- Fill in the connection details:
| Field | Description | Example |
|---|---|---|
| Name | Display name for this host | Primary DB Server |
| Host | Hostname or IP of the MySQL server | db.example.com |
| Port | MySQL port | 3306 |
| Username | MySQL user with CREATE/DROP/GRANT privileges | badgerpanel |
| Password | MySQL password | |
| Max Databases | Maximum databases allowed on this host (0 = unlimited) | 100 |
- Click Test Connection to verify the panel can connect.
- Click Create.
The MySQL user must have sufficient privileges to create databases, create users, and grant permissions. At minimum:
GRANT CREATE, DROP, ALTER, INDEX, SELECT, INSERT, UPDATE, DELETE,
CREATE USER, GRANT OPTION ON *.* TO 'badgerpanel'@'%';Managing Databases
The database host detail page shows all databases provisioned on that host, including:
- Database name
- Associated server
- Size
- Creation date
Databases are created and deleted by server owners from the server's Databases tab. Administrators can view all databases across hosts from the admin panel.
Connection Testing
Use the Test Connection button on the host detail page at any time to verify connectivity. The test checks:
- Network reachability (host and port)
- Authentication (username and password)
- Required privileges
phpMyAdmin Integration
If phpMyAdmin is enabled, users can access their databases through a web interface. BadgerPanel generates a single-sign-on token that logs the user directly into phpMyAdmin with their database credentials.
Configure the phpMyAdmin URL in the database host settings. The phpMyAdmin instance must be accessible from the user's browser.
Firewall Requirements
The database host must accept connections from:
- The panel server (for provisioning and management)
- The game server nodes (for game servers to connect to their databases)
Ensure your firewall allows inbound connections on the MySQL port (default 3306) from these sources.
Removing a Database Host
Before removing a host, delete all databases provisioned on it (or migrate them). Navigate to the host detail page and click Delete.
Next Steps
- Server Management - database management from the server view
- Daemon Installation - setting up game server nodes
