Skip to main content
This guide explains how to create a new MySQL database in DirectAdmin and connect it to your website configuration file.

1. Open the Databases Menu

  1. Log in to your DirectAdmin hosting panel.
  2. Under the Account Manager menu, click the Databases icon.
Databases Menu

Select Databases under Account Manager


2. Fill Out the Create Database Form

Under the Create Database section:
  1. Database Name: Enter your preferred database suffix (e.g. tes). Your full database name will automatically include your account prefix (e.g. testing574_tes).
  2. User name: Enter the database username suffix (e.g. tes).
  3. Password: Enter a secure password for the database user.
  4. Click the blue CREATE button.
Create Database Form

DirectAdmin Create Database form


3. Save Connection Credentials

Once created, a green success banner titled Database created will appear:
Database Created Details

Database connection details

CRITICAL - Database Hostname: In your application or .env configuration file (such as WordPress, Laravel, or custom PHP scripts), the database host MUST be set to localhost, not a domain name or IP address.

Example Configuration in .env:


4. Open & Manage Database in phpMyAdmin

To manage tables, run queries, or import/export .sql dumps:
  1. On the Databases page, click the blue PHPMYADMIN button in the upper-right corner.
  2. You will be automatically authenticated (Single Sign-On) into phpMyAdmin without needing to re-enter credentials!

Done 🎉

Your MySQL database is now created and ready for your website or web application.
Last modified on August 30, 2026