Skip to main content

Overview

XyraPanel allows you to create and manage MySQL databases directly from your server panel. Many plugins, mods, and game servers require databases to store player data, statistics, and other persistent information.

Accessing Databases

Navigate to your server’s database management:
/server/{server-identifier}/databases
The databases page displays all databases created for your server with connection details and management options.

Prerequisites

Database creation requires:
  • A database host configured by your administrator
  • Database allocation available for your server
  • The server.database.create permission
If no database host is configured, you’ll see a warning message that databases are unavailable.

Creating a Database

1

Click Create Database

Click the Create Database button in the top-right corner.
2

Configure Database

Fill in the database details:
Enter a descriptive name for your database (e.g., playerdata, statistics).The actual database name will be prefixed with your server ID:
s{server-id}_{your-name}
This prevents conflicts between servers.
3

Create Database

Click Create Database. The database is provisioned immediately.
4

Save Credentials

A modal displays the database password. This is the only time you’ll see it!Copy the password using the copy button and save it securely.
Database passwords cannot be retrieved later. You can only rotate to a new password.
API endpoint:
POST /api/client/servers/{server}/databases
{
  "name": "playerdata",
  "remote": "%"
}
{
  "data": {
    "id": "database-uuid",
    "name": "s12345678_playerdata",
    "username": "u12345678_playerdata",
    "host": "mysql.example.com",
    "port": 3306
  },
  "meta": {
    "password": "randomly-generated-password-here"
  }
}
The password is only returned once in the meta field.

Database Information

Each database displays:
  • Name: Full database name (prefixed)
  • Host: Database server hostname or IP
  • Port: Database server port (usually 3306)
  • Username: Database user (prefixed with server ID)

Connecting to Your Database

Use the connection details to connect from your plugins or applications:
database:
  host: mysql.example.com
  port: 3306
  database: s12345678_playerdata
  username: u12345678_playerdata
  password: your-database-password

JDBC Connection String

For Java applications (Minecraft plugins):
jdbc:mysql://mysql.example.com:3306/s12345678_playerdata?user=u12345678_playerdata&password=your-database-password

Rotating Passwords

If you lose your password or need to change it for security:
1

Click Rotate Password

Click the Rotate Password button next to a database.
2

New Password Generated

A new random password is generated and displayed in a modal.
3

Save New Password

Copy the new password immediately. The old password is now invalid.
4

Update Connections

Update your plugins and applications with the new password to restore database access.
API endpoint:
POST /api/client/servers/{server}/databases/{database}/rotate-password
Password rotation immediately invalidates the old password. All applications using the database will lose access until you update them with the new password.

Deleting Databases

Destructive OperationDeleting a database permanently removes the database, user, and all data. This cannot be undone. Back up your data first!
1

Click Delete

Click the Delete button next to the database you want to remove.
2

Confirm Deletion

A warning modal explains the consequences. Click Yes, Delete Database to confirm.
3

Database Removed

The database and all its data are permanently deleted from the database host.
API endpoint:
DELETE /api/client/servers/{server}/databases/{database}

Database Limits

Administrators can set database limits per server:
  • 0 = Unlimited: Create as many databases as the host allows
  • 1 database: Maximum of 1 database
  • 5 databases: Maximum of 5 databases
When you reach your limit:
  • Delete unused databases before creating new ones
  • Or ask an administrator to increase your limit
Check your server’s database limit in the server details or by attempting to create a database. You’ll see an error if you’ve reached the limit.

Database Host Status

If no database host is available, you’ll see a warning:

No Database Host

What this means: Your administrator hasn’t configured a MySQL/MariaDB database host for XyraPanel.What to do: Contact your administrator to set up database hosting. They’ll need to add a database host in the admin panel under Database Hosts.

Common Use Cases

Many plugins require databases:
  • LuckPerms: Store permissions across multiple servers
  • CoreProtect: Log block changes and rollback griefing
  • Dynmap: Store map data and markers
  • McMMO: Store player skills and stats
Configure these plugins to use your XyraPanel database instead of SQLite for better performance and cross-server compatibility.

Accessing via phpMyAdmin

Some XyraPanel installations include phpMyAdmin for direct database access:
  1. Ask your administrator for the phpMyAdmin URL
  2. Log in with your database username and password
  3. Select your database from the left sidebar
  4. Run queries, view tables, and manage data directly
phpMyAdmin access is optional and must be set up by your administrator. Not all installations include it.

Best Practices

Secure Remote Access

Use specific IP addresses instead of % for the remote field when possible. Only allow your server’s IP.

Regular Backups

Back up your database regularly using mysqldump or your host’s backup tools. Server backups don’t include database data.

Strong Passwords

XyraPanel generates strong random passwords. Never change them to simple passwords.

One Database per Purpose

Create separate databases for different plugins or purposes for better organization and security.

Save Credentials

Store database passwords in a secure password manager. You can’t retrieve them later, only rotate them.

Clean Up Unused

Delete databases you’re no longer using to stay within your limit and reduce security exposure.

Troubleshooting

  • Check if you’ve reached your database limit (shown in error message)
  • Verify a database host is configured (look for warning banner)
  • Ensure you have server.database.create permission
  • Ask administrator to check database host status
  • Verify the host and port are correct
  • Check the remote access setting allows your IP
  • Ensure your server has network access to the database host
  • Try changing remote access to % temporarily to test
  • Verify you’re using the correct username (with prefix)
  • Check password is correct (case-sensitive)
  • If unsure, rotate the password to get a new one
  • Ensure database status is “Ready” not “Revoking”
  • You cannot retrieve the original password
  • Use Rotate Password to generate a new password
  • Update all applications with the new password

API Reference

List Databases

GET /api/client/servers/{server}/databases
{
  "data": [
    {
      "id": "database-uuid",
      "name": "s12345678_playerdata",
      "username": "u12345678_playerdata",
      "remote": "%",
      "status": "ready",
      "host": {
        "hostname": "mysql.example.com",
        "port": 3306
      },
      "createdAt": "2024-01-15T10:00:00Z",
      "updatedAt": "2024-01-15T10:00:00Z"
    }
  ],
  "hostAvailable": true
}
The hostAvailable field indicates whether a database host is configured.

Permissions

Database management requires specific permissions:
  • View databases: server.database.read
  • Create databases: server.database.create
  • Rotate passwords: server.database.update
  • Delete databases: server.database.delete
Server owners and admins have all permissions by default.

Next Steps

Backups

Server backups don’t include database data. Learn about exporting database backups.

Schedules

Automate database maintenance tasks with scheduled commands.

Build docs developers (and LLMs) love