TicketHelp
Language

Client Portal

Home / Client Portal

How do I create a MySQL database (cPanel & DirectAdmin)

24 0 0

Any dynamic website (like WordPress) needs a MySQL database to store texts, settings and users. The process involves three elements: Database Name, User and Password.


Variant A: Create in cPanel

The simplest method in cPanel is to use the wizard.

  1. Log in to cPanel.

  2. Look for the Databases section and click MySQL Database Wizard.

  3. Step 1 (Name): Enter a name for the database (ex: site_wp). Press Next Step.

  4. Step 2 (User): Enter a username (can be the same as the database name) and a secure password. Press Create User.

  5. Step 3 (Privileges): Check the ALL PRIVILEGES box to give the user permission to write and read data.

  6. Finish: Press Make Changes. Now you have the data ready to install the site.


Variant B: Creating in DirectAdmin

In DirectAdmin, the process is centralized in a single page.

  1. Log in to DirectAdmin.

  2. Go to Account Manager -> MySQL Management.

  3. Click the Create New Database button (in the right corner).

  4. Configuration:

    • Database Name: Name of the database.

    • Database User: The user (you can leave "Same as database name" checked).

    • Database Password: Enter a password or generate a random one (recommended).

  5. Click Create Database.

  6. Save data: The system will show you a screen with all the created data (Host, User, Password). Copy them, as you will need them in your site's configuration file.


Important information (Technical details)

  • Database host: For both control panels, the host is almost always localhost.

  • Prefix: Note that both the database name and the user name will have a prefix (usually the username of the hosting account), of the form: user_name. You must enter the full name in the site settings.

  • Security: Never use your cPanel/DirectAdmin password as your database password. Create unique passwords for each individual database.

Was this article helpful?