Databases

How to create and manage databases

~2 min read

Create MySQL or MariaDB databases and users, assign permissions, and get your connection string — all without touching the command line.

Steps

  1. 1

    Open Databases

    Open your server and click "Databases" in the sidebar.

  2. 2

    Create a database

    Click "Create Database". Enter a name (e.g. myblog_db) and select the character set — UTF8MB4 is selected by default and supports all languages and emoji.

  3. 3

    Create a database user

    Click "Create User". Enter a username (e.g. myblog_user) and a strong password. DeployFly can generate a secure password for you.

  4. 4

    Assign the user to the database

    In the user's row, click "Assign to Database". Select the database and choose privileges. "All Privileges" is correct for most applications.

  5. 5

    Copy the connection string

    Click "Connection Info" to see the full database connection string. Copy it directly into your application's .env or config file.

  6. 6

    Enable remote access (optional)

    If you need to connect to this database from your local machine or another server, toggle "Allow Remote" on the user. A firewall rule for port 3306 is added automatically.

Watch out

  • Enabling remote MySQL access exposes port 3306 to the internet. Restrict to a specific IP using the source field to improve security.

Tips

  • Create one database user per application — never share database credentials between multiple apps.
  • The host for local connections is 127.0.0.1. For remote connections, use your server's public IP.

Related guides