Chapter 12 · 12.1
Creating a database
Watch it in a short video
Many websites store their content in a database: WordPress, for example, keeps your pages, posts, comments and settings in one. If you install WordPress or another package with Installatron, Installatron creates the database for you automatically (see Installing WordPress). If you set up a website yourself, or move a website to WebOké, you create the database yourself in DirectAdmin.
Opening Databases
In DirectAdmin, click Databases under Account Manager. You'll see:
- the PHPMYADMIN and MANAGE USERS buttons at the top;
- the Databases List with all your databases, showing the size, number of users and number of tables for each database;
- below that, the Create Database block;
- right at the bottom, Server Details, showing the version of the database server (MariaDB) and the hostname.

Quick: database and user in one go
- In the Create Database block, type a short name under Database Name, for example shop. Use lower case letters, numbers and an underscore (_).
- Click CREATE.
DirectAdmin now creates the database and a user with the same name and a strong password. You'll immediately see a green Database created block with all the details your website needs:

| Detail | Example | Explanation |
|---|---|---|
| Hostname | localhost | Always localhost for a website on the same package. |
| Database | wtsilefl_shop | Your DA username, an underscore and the name you chose. |
| Username | wtsilefl_shop | With the quick method, the same as the database name. |
| Password | (generated by DirectAdmin) | Click the copy button next to it and save it straight away. |
Please note: You'll only see the password once. Copy it straight away to your password manager or to your website's configuration file, before you click Deny or leave the page. Lost it anyway? Then set a new password for the user (see Database users, privileges and passwords).
The prefix: your DA username
DirectAdmin automatically adds your DA username and an underscore to every database and database user, for example wtsilefl_. You'll already see this in the input field. In your website's settings (such as wp-config.php for WordPress), always enter the full name, so wtsilefl_shop and not just shop. If you forget the prefix, you'll get a message like "Error establishing a database connection" (see 'Error establishing a database connection').
Choosing your own username and password: Advanced mode
Want a different username than the database name, or to choose your own password? Click Advanced mode. You'll get three fields: Database Name, User name and Password (already filled in with a strong password, which you can change). Then click CREATE.

Deleting a database
In the Databases List, click Delete next to the database and confirm. The database and everything in it will then be gone. Make an export first if you're unsure (see Exporting a database). If a database belongs to an installation in Installatron, it's better to delete it via Installatron: that way, the files and the database are removed together (see Deleting an installation).
Frequently asked questions
How many databases can I create?
Next to Database Count above the list, you'll see how many you have and how many your package allows. Databases count towards your storage space.
The list says "No databases found", even though I've just created a database.
Refresh the page. The list sometimes only updates after a few seconds.
Which database server do you use?
MariaDB, an almost fully interchangeable variant of MySQL. Software that requires MySQL works with it. The exact version is shown at the bottom under Server Details.
