Skip to main content
Pterodactyl allows you to create and manage MySQL/MariaDB databases directly from the panel. Each server can have multiple databases depending on the configured limit.

Creating a Database

Create a new database for your server:
Create Database
Response
1

Navigate to Databases

Go to your server’s Databases tab in the panel.
2

Enter Database Name

Provide a name for your database (e.g., “minecraft”, “stats”, “economy”).
3

Set Remote Access

Configure the remote connection host:
  • % - Allow connections from anywhere
  • 192.168.1.% - Allow from specific subnet
  • localhost - Local connections only
4

Create Database

Click Create. The database, user, and password are generated automatically.

Database Naming

Database names are automatically prefixed with your server identifier:
  • You specify: minecraft
  • Actual database: s1_minecraft
  • Username: u1_xK9pL2mQ (random)
This prevents conflicts between servers on shared database hosts.

Listing Databases

View all databases for a server:
List Databases
Response
The password is not included in list responses for security. It’s only returned when creating a database or rotating the password.

Database Connection Details

Use these details to connect from your game server:
Example Plugin Config

JDBC Connection String

For Java applications:

PHP PDO

Rotating Passwords

Change the database password for security:
Rotate Password
Response
Rotating the password immediately invalidates the old password. Update your server configuration before rotating to avoid downtime.
1

Prepare New Configuration

Have your config file ready to update with the new password.
2

Rotate Password

Click the “Rotate Password” button in the panel or use the API.
3

Copy New Password

The new password is displayed once. Copy it immediately.
4

Update Configuration

Update your server’s database configuration with the new password and restart the server.

Deleting a Database

Remove a database permanently:
Delete Database
Success
Deleting a database permanently removes all data and cannot be undone. Ensure you have backups before deleting.

Database Limits

Servers have a maximum number of databases they can create:
Check Limit
Response
If you try to create more databases than allowed:
Error Response
Contact your server administrator to increase the database limit if needed.

Remote Access Configuration

The remote field controls which hosts can connect:

Allow All (Default)

Permits connections from any IP address. Use this for most applications.

Specific IP

Only allows connections from 192.168.1.100.

IP Range/Subnet

Allows entire 10.0.0.0/16 subnet.

Localhost Only

Restricts connections to the local server only.
Some database hosts may restrict remote access regardless of this setting. Check with your host provider.

Common Use Cases

Many Minecraft plugins require MySQL for data storage:LuckPerms:
CoreProtect:
Store player stats, rankings, and leaderboards:
Connect your server to a website or forum:
  • Sync player ranks between game and site
  • Display online players on website
  • Integrated donation systems
  • Ban lists and appeal systems
Share data across multiple game servers:
  • Cross-server chat
  • Global economy
  • Network-wide bans
  • Synchronized player data
Create a shared database and configure all servers to use it.

Accessing via Command Line

Connect to your database using the MySQL client:
Or with a one-liner:
Avoid using the password in the command line on shared systems as it may be visible in process lists.

Activity Logging

Database operations are logged:
Example Logs

Best Practices

Name databases based on their purpose: economy, stats, auth, etc. This makes management easier.
Database backups are separate from server file backups. Use mysqldump or your host’s backup tools:
If you don’t need external connections, use localhost for the remote field to improve security.
Some database hosts limit concurrent connections. Monitor your plugins’ connection pool settings.

Troubleshooting

  • Verify host and port are correct
  • Check remote access configuration
  • Ensure password is correct (try rotating)
  • Verify firewall allows MySQL port (3306)
  • Check database host is online
  • Confirm username and password
  • Check remote field allows your IP
  • Verify database exists on the host
  • Check database host allows external connections
  • Reduce plugin connection pool sizes
  • Enable connection pooling
  • Contact host to increase limit
  • Check for connection leaks in plugins
You’ve hit the maximum databases for your server. Options:
  • Delete unused databases
  • Request limit increase from admin
  • Consolidate data into fewer databases