How to Create Databases and Users Using cPanel's MySQL Database Wizard Make it Rain Paper

  • Databases, cPanel
  • 0

Pre-requirements

  • Access to your cPanel account.
  • Basic understanding of database management.
  • Ensure you have a valid database name and user information ready.

Why Avoid Using phpMyAdmin for Database Creation?

We strongly recommend that you avoid using phpMyAdmin to create databases or users because phpMyAdmin doesn’t map databases properly, which can cause backups and restorations to malfunction. Instead, use the MySQL Database Wizard in cPanel to handle database creation and user management.

Steps to Create a MySQL Database and User Using the MySQL Database Wizard

  1. Log in to your cPanel account.
  2. In the Databases section of the cPanel home screen, click on MySQL Database Wizard.
  3. In the New Database text box, enter a name for your database, then click Next Step.
  4. In the Username text box, enter a name for the user who will manage the database.
  5. Enter and confirm the user’s password.
  6. Click Create User.
  7. Select the privileges you want to assign to the user or select ALL PRIVILEGES.
  8. Click Next Step to complete the setup. A confirmation message will appear, confirming the database and user account have been successfully created.

Steps to Manually Create a MySQL Database Using MySQL Databases

  1. Log in to your cPanel account.
  2. In the Databases section, click on MySQL Databases.
  3. Under Create New Database, enter the database name and click Create Database.
  4. After the database is created, click Go Back.
  5. Under Add User to Database, select the user and the database, then click Add.
  6. Assign user privileges by selecting specific permissions or ALL PRIVILEGES, then click Make Changes.

Gotchas to Avoid

  • Ensure your database and user names are descriptive and follow your hosting provider’s naming conventions.
  • Avoid using phpMyAdmin to create databases and users as it may cause issues with backups and restorations.

How to Import a Database Using phpMyAdmin

  1. Log in to your cPanel account and scroll down to the Databases section.
  2. Click on the phpMyAdmin icon.
  3. In phpMyAdmin, select the database you want to import data into.
  4. Click on the Import tab.
  5. Click Choose File and select the compressed SQL file from your local machine.
  6. Ensure that SQL is chosen as the format, then click Go.

Gotchas to Avoid

  • If your SQL file is larger than 2MB, make sure to compress it (e.g., using zip) before importing.

Alternative: Using One-Click App Installer for Database Management

If you're installing web applications or scripts, consider using our one-click app installer, which automatically handles the database setup for you. This is a more straightforward option, especially for applications like WordPress, Joomla, and others.

Visit our documentation on how to use Softaculous for automated installs.

Managing your databases and users via cPanel is easy and secure when done correctly. Use the MySQL Database Wizard or MySQL Databases to create databases and users, and avoid using phpMyAdmin for these tasks to ensure your backups and restorations function properly. If you're unsure about managing your databases manually, consider using our one-click installer to streamline the process.

If you want to add to this tutorial or have found an error in it, please send an email to team+editorial@webhostingm.com


Did this answer help?

« Back