Managing MySQL databases in DirectAdmin
Create MySQL databases and users, assign privileges, and use phpMyAdmin for database management in DirectAdmin.
DirectAdmin manages MySQL databases through its own interface. You create a database and a database user separately, then assign the user to the database with specific permissions.
Create a database
- Log in to DirectAdmin
- Go to Your Account → MySQL Management
- In the Create a Database section, enter a name for the database
- Click Create
The database name is prefixed with your username automatically (e.g., username_dbname). Use this full prefixed name in your application's configuration.
Create a database user
- In MySQL Management, scroll to Create a User
- Enter a username and password
- Click Create
- In the Assign Users to a Database section, select the database and user, then click Add User to Database
When installing WordPress manually, create the database and user first, then enter the full prefixed database name, username, password, and host (localhost) in the WordPress installation wizard or wp-config.php.
phpMyAdmin
Access phpMyAdmin from MySQL Management → click the phpMyAdmin icon next to your database. phpMyAdmin provides a graphical interface to browse tables, run SQL queries, view and edit rows, and manage database structure. Log in with your database username and password.
Import and export
Export (backup): In phpMyAdmin, select your database → click Export → choose SQL format → click Go. Save the .sql file locally.
Import (restore): In phpMyAdmin, select the target database → click Import → choose the .sql file → click Go. For large files (over 50 MB), use the command line via SSH: mysql -u username -p database_name < backup.sql
Related: DirectAdmin overview | cPanel databases | Database connection error | Installing WordPress
Need DirectAdmin hosting?
DirectAdmin is available for customers who want a lightweight hosting control panel on compatible UnderHost services.





















