
Almost every modern web application — from WordPress and WooCommerce to custom PHP systems — relies on a MySQL database to store content, user accounts, and settings. DirectAdmin makes it straightforward to create and manage databases without touching the command line. This guide walks you through the entire process step by step.
The Databases Section in DirectAdmin
Log in to your DirectAdmin control panel, then navigate to Advanced Features → MySQL Management (or look for the MySQL Databases icon under the main dashboard). This section lets you:
- Create new MySQL databases
- Create database users and assign passwords
- Set user privileges on specific databases
- Access phpMyAdmin for visual database management
Important: DirectAdmin automatically prefixes both the database name and the database username with your hosting account name. For example, if your account is mysite and you create a database called shop, the actual database name will be mysite_shop. The same applies to usernames.
Step 1 — Create a MySQL Database
- From the DirectAdmin dashboard, click MySQL Management.
- In the Create New Database field, enter a short, descriptive name (e.g.,
wordpressorshop). - Click Create Database.
- The database will appear in the list below with your account prefix added automatically.
Step 2 — Create a Database User
Each database needs at least one user with a password to connect to it. Create a user separately so you can reuse users across multiple databases if needed.
- Still in MySQL Management, find the Add New User to Database or Create User section.
- Enter a username (e.g.,
wpuser) — it will be prefixed with your account name automatically. - Enter a strong password. Use a mix of uppercase letters, numbers, and symbols. You can click the password generator icon if available.
- Click Create User.
Step 3 — Set ALL PRIVILEGES and Link User to Database
Creating a user does not automatically grant access to a database. You must link the user to the database and assign the appropriate privileges.
- In the MySQL Management screen, find the database you created.
- Click the database name or the Manage / Add User button next to it.
- Select the user you just created from the dropdown list.
- Choose ALL PRIVILEGES (recommended for application databases like WordPress).
- Click Add User to Database to confirm.
Tip: When setting up WordPress or other CMS platforms, use the full prefixed names in the configuration file. For example, in wp-config.php set DB_NAME to mysite_wordpress and DB_USER to mysite_wpuser.
Step 4 — Access phpMyAdmin from DirectAdmin
phpMyAdmin is a browser-based tool for visually managing your MySQL databases. To open it from DirectAdmin:
- Go to MySQL Management in DirectAdmin.
- Click the phpMyAdmin button or link. You will be logged in automatically using your account credentials.
- In phpMyAdmin, select your database from the left-hand panel to view and edit tables.
Import and Export Databases via phpMyAdmin
Importing a Database
Use import to restore a backup or move a site from another host:
- In phpMyAdmin, click the target database name in the left panel.
- Click the Import tab at the top.
- Click Choose File and select your
.sqlfile. - Leave the format as SQL and click Go. Large databases may take a few minutes.
Exporting a Database
Use export to back up your database or migrate it to a new server:
- In phpMyAdmin, click the database you want to export.
- Click the Export tab.
- Choose Quick export method and SQL format.
- Click Go — your browser will download a
.sqlfile containing all tables and data.
Summary of Key Points
- Database names and usernames are always prefixed with your hosting account name.
- Always assign ALL PRIVILEGES when linking a user to an application database.
- Use phpMyAdmin for imports, exports, and browsing table contents.
- Keep your database credentials secure — never expose them in public files.
Ready to Build Your Website?
AsiaGB hosting includes MySQL databases, phpMyAdmin, and DirectAdmin — everything you need for WordPress, WooCommerce, and custom PHP apps.
View Hosting Plans