Setting Up a New Database
MySQL databases are used by web applications such as WordPress, Joomla, and custom PHP applications to store content, user accounts, settings, and other dynamic data. This guide walks you through creating a new database in DirectAdmin.
Step-by-Step Instructions
- Log in to DirectAdmin.
- Navigate to Account Manager or find MySQL Management on the dashboard.
- Click on MySQL Databases.
- Click Create New Database.
- Enter a Database Name. DirectAdmin will automatically prefix this with your username (e.g.,
username_dbname). - Enter a Database Username. This will also be prefixed with your account username.
- Enter and confirm a Password for the database user. Use the password generator for a strong random password.
- Click Create to set up the database.
The database name and username are automatically prefixed with your DirectAdmin username and an underscore. For example, if your username is
myuser and you enter wp, the database name will be myuser_wp.After Creating the Database
Once created, you will need the following details to connect your application to the database:
- Database Name:
username_dbname - Database User:
username_dbuser - Password: The password you set during creation.
- Hostname:
localhost(for applications running on the same server).
Verifying the Database
You can verify your database was created successfully by:
- Checking the database list on the MySQL Management page in DirectAdmin.
- Logging into phpMyAdmin and looking for the database in the left sidebar.
Keep your database credentials secure. Never share them publicly or include them in files that are accessible via the web. Store them in configuration files outside the document root when possible.