Skip to content

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

  1. Navigate to Admin > Database Hosts and click Add Host.
  2. Fill in the connection details:
FieldDescriptionExample
NameDisplay name for this hostPrimary DB Server
HostHostname or IP of the MySQL serverdb.example.com
PortMySQL port3306
UsernameMySQL user with CREATE/DROP/GRANT privilegesbadgerpanel
PasswordMySQL password
Max DatabasesMaximum databases allowed on this host (0 = unlimited)100
  1. Click Test Connection to verify the panel can connect.
  2. Click Create.

The MySQL user must have sufficient privileges to create databases, create users, and grant permissions. At minimum:

sql
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

BadgerPanel Documentation