GigaGlobe

Creating a MySQL Database in DirectAdmin

53 views Database Management
<h3>Setting Up a New Database</h3> <p>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.</p> <h3>Step-by-Step Instructions</h3> <ol> <li>Log in to DirectAdmin.</li> <li>Navigate to <strong>Account Manager</strong> or find <strong>MySQL Management</strong> on the dashboard.</li> <li>Click on <strong>MySQL Databases</strong>.</li> <li>Click <strong>Create New Database</strong>.</li> <li>Enter a <strong>Database Name</strong>. DirectAdmin will automatically prefix this with your username (e.g., <code>username_dbname</code>).</li> <li>Enter a <strong>Database Username</strong>. This will also be prefixed with your account username.</li> <li>Enter and confirm a <strong>Password</strong> for the database user. Use the password generator for a strong random password.</li> <li>Click <strong>Create</strong> to set up the database.</li> </ol> <div class="alert alert-info">The database name and username are automatically prefixed with your DirectAdmin username and an underscore. For example, if your username is <code>myuser</code> and you enter <code>wp</code>, the database name will be <code>myuser_wp</code>.</div> <h3>After Creating the Database</h3> <p>Once created, you will need the following details to connect your application to the database:</p> <ul> <li><strong>Database Name:</strong> <code>username_dbname</code></li> <li><strong>Database User:</strong> <code>username_dbuser</code></li> <li><strong>Password:</strong> The password you set during creation.</li> <li><strong>Hostname:</strong> <code>localhost</code> (for applications running on the same server).</li> </ul> <h3>Verifying the Database</h3> <p>You can verify your database was created successfully by:</p> <ul> <li>Checking the database list on the MySQL Management page in DirectAdmin.</li> <li>Logging into phpMyAdmin and looking for the database in the left sidebar.</li> </ul> <div class="alert alert-warning">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.</div>
Need More Help?

Can't find what you're looking for? Our support team is ready to help.

Contact Support
Hi there! How can we help?