Updated guide: This article has been refreshed for current hosting environments. Control-panel labels and available features can vary slightly by account, server configuration, or software version, but the workflow below follows the current approach used on modern hosting platforms. This guide is written to help you complete How to Create a New Database User in DirectAdmin safely and understand what to check if the expected result does not appear.
Before you begin
- Confirm the database name and username before changing configuration files.
- Create a backup before importing, deleting or modifying tables.
- Use the correct database user privileges for the application.
- For large databases, check the hosting limits before starting an import.
Database naming and permissions
On many cPanel servers, database names and users are prefixed with the hosting account username. An application configuration file may therefore contain a name such as cpuser_app rather than simply app. The database user must also be assigned to the database with the required privileges. A correct database name with the wrong user privileges will still result in connection or permission errors.
Before importing an SQL file
- Check the file size and the available database/import limits.
- Make sure the target database is the intended database.
- If replacing an existing database, take a fresh backup first.
- For very large imports, ask support whether command-line or server-side import is available.
Database troubleshooting
- Access denied: Check the database username, password, database name and user privileges. In cPanel, make sure the user is assigned to the database with the required privileges.
- Connection failed: Confirm the application is using the correct database host. Many shared-hosting applications use localhost, but this can vary by server configuration.
- Import fails: Check the SQL file size, PHP upload limits and database limits. For large imports, a command-line or provider-assisted import may be more appropriate.
- Site broke after an import: Do not repeatedly import the same dump. First determine whether the application tables, database prefix, character set or configuration file were affected.
When to contact support
Contact support when the required feature is unavailable, a server-level service is failing, an account is locked, a restore requires privileges you do not have, or you have verified the settings but the service still does not work. When contacting support, include the domain name, the exact error message, what you changed, when the issue started, and screenshots or log output where appropriate. Do not send passwords or other authentication secrets.
Original illustrated procedure
1. Log in to your DirectAdmin Account.
2. In the Account Manager section, click on MySQL Management or type MySQL Management in the navigation filter box. The option will appear. Click on it.![]()
3. From the list of databases, choose the database for which you want to create a user.
4. Under Users, click on Create New User.
5. Enter your new username and password in the password field or click on the Generate Random Password icon to generate one. Continue with Create.
Please, copy the newly-created database user details to a safe place.