Your account includes one database, and extra databases are £0.99 each, paid once in the client area. Softaculous creates the database for you when installing an app. For your own code or a manual migration, create one here.
Steps
- Open Account Manager then MySQL Management.
- Select Create new Database.
- Enter a database name, such as
shop. - Enter a database username, such as
shop, or choose the same name. - Set a strong password (use the generator and store it safely).
- Select Create.
The account prefix
DirectAdmin prefixes names with your account username. If your username is acme, you get:
- Database:
acme_shop - User:
acme_shop
Always use the full prefixed names in your application. Leaving the prefix off is the most common cause of connection errors.
What your application needs
| Setting | Value |
|---|---|
| Host | localhost |
| Database name | The full prefixed name |
| Username | The full prefixed user |
| Password | The password you set |
| Port | 3306 (the default; usually not needed) |
Connecting a PHP application to your database shows these in code.
Next
- Import existing data: How to import a database with phpMyAdmin
- Browse the database: How to access and use phpMyAdmin
- Add extra users or change privileges: Managing database users and privileges
Looking for somewhere to run PHP and MySQL? Traxio’s free PHP MySQL hosting includes phpMyAdmin and is free for your first 30 days.