Creating a MySQL database

Creating a database, user and password for your site.

Hosting and DirectAdmin ~1 min read Updated: 30.09.2026
  1. In DirectAdmin, open Account Manager → MySQL Management.
  2. Click Create New Database.
  3. Enter the database name. The username is set to the same automatically; create or generate a password.
  4. Click Create and save the details shown on screen.

Enter these details in your site’s config file (e.g. wp-config.php in WordPress):

SettingValue
DB hostlocalhost
DB nameaccount_dbname
DB useraccount_user
DB passwordthe password you created
DirectAdmin prefixes database and user names with your account name and an underscore — use the full name in your configuration.
Problem not solved?

Our team is here 24/7 — open a ticket or write to the AI Advisor.