Databases are the backbone of many websites and applications. In DirectAdmin, you can easily create and manage MySQL databases and their associated users directly from the control panel. This guide walks you through the process step by step.
Step 1: Log in to DirectAdmin
Open your browser and go to your DirectAdmin login page (e.g., yourdomain.com:2222).
Enter your username and password to access the control panel.
Step 2: Navigate to MySQL Management
From the dashboard, look for MySQL Management under the Account Manager section.
Click on it to open the database management interface.
Step 3: Create a New Database
Click on Create New Database.
Enter the following details:
Database Name – Choose a descriptive name (e.g., school_db).
Database Username – Create a unique user who will access this database (e.g., school_user).
Password – Assign a strong password for security. (Use DirectAdmin’s password generator if needed).
Click Create Database.
👉 DirectAdmin will automatically create the database and assign the user to it.
Step 4: Manage Database Users
After creating the database, you may need to manage user access:
Add Additional Users:
Go back to MySQL Management.
Select the database and click Add New User.
Enter username and password, then assign to the database.
Change User Passwords:
Under MySQL Management, click the user account.
Select Change Password, enter the new password, and save.
Delete Users or Databases:
Select the database or user from the list.
Click Delete to remove them (be careful, as deleting a database removes all its data).
Step 5: Access Your Database
Once your database and user are set up, you can access it using:
phpMyAdmin – Available in DirectAdmin for managing tables, running SQL queries, and importing/exporting data.
Application Configuration – Update your app (e.g., WordPress wp-config.php) with:
Database Name
Username
Password
Host (usually localhost)
Best Practices
Always use strong, unique passwords for database users.
Limit user privileges to only what’s necessary.
Regularly back up your databases to avoid data loss.
Delete unused databases and users to keep your hosting environment clean.
Creating and managing databases in DirectAdmin is straightforward. By properly setting up databases and users, you ensure your applications run smoothly while maintaining security and control.