---
title: How to create a MySQL database in DirectAdmin
description: "# How to Create a MySQL Database in DirectAdmin Sooner or later, you'll need a database for your site — WordPress, WooCommerce, and most CMS platforms require one to store content, users, and settings. DirectAdmin makes it easy to create…"
url: "https://simplywebservices.net/docs/how-to-create-a-mysql-database-in-directadmin/"
updated: "2026-08-14"
category: DirectAdmin
---

# How to create a MySQL database in DirectAdmin

# How to Create a MySQL Database in DirectAdmin

Sooner or later, you'll need a database for your site — WordPress, WooCommerce, and most CMS platforms require one to store content, users, and settings. DirectAdmin makes it easy to create MySQL databases and database users directly from your control panel.

![Screengrab of Directadmin (user), Showing Where "databases" is Located](https://simplywebservices.net/wp-content/uploads/2022/01/DirectAdmin-Databases-1024x845.jpg)

## **How to Create a New Database and User**

1. [Log in to your DirectAdmin](https://simplywebservices.net/docs/how-to-log-into-the-directadmin-control-panel/) control panel by accessing https://yourdomain:2222
2. Navigate to **Databases**(under **Account Management**)
3. Enter the database name, the database user you want to add, and the user's password.

*Database names and usernames automatically begin with your DirectAdmin username followed by an underscore — for example: `directadminusername_dbname` and `directadminusername_dbuser`.*

      4. Click the **Create** button. The database and user will be created. You will see a confirmation message: *Database Created*

With this tool, you can also **Repair**, **Check** and **Optimize** databases. Just select the database(s) and click the button for your intended action.

### Using Your New Database with WordPress

If you're installing WordPress or another CMS, you'll need these four values during setup (usually in `wp-config.php`): -

- Database Name: `directadminusername_dbname` -
- Database Username: `directadminusername_dbuser` -
- Database Password: the password you set in step 3 -
- Database Host: `localhost` (the default for DirectAdmin-hosted databases)

#### Managing Your Database

Once created, you can **Repair**, **Check**, and **Optimize** your database directly from this screen — just select the database and click the button for your intended action.

For more advanced management (browsing tables, running SQL queries, importing/exporting data), see our guide on [managing MySQL databases with phpMyAdmin in DirectAdmin](https://simplywebservices.net/docs/managing-mysql-databases-with-phpmyadmin-in-directadmin/).

Don't forget to include your databases in your regular [website backups](https://simplywebservices.net/docs/how-to-backup-your-website-in-directadmin/) to protect your content.
