Skip to content

How to upload database in cPanel?

Uploading a database in cPanel involves creating a new database, assigning a user to it, and then importing the database file using phpMyAdmin. Here is a detailed, user-friendly guide to help you through the process:

Step-by-Step Guide to Upload a Database in cPanel

Section titled “Step-by-Step Guide to Upload a Database in cPanel”
  1. Log In to cPanel: Open your web browser and navigate to your cPanel login page. Enter your credentials to log in.
  1. Navigate to MySQL® Databases: In the cPanel dashboard, locate and click on the “MySQL® Databases” icon under the Databases section.
  2. Create a Database: In the “Create New Database” section, enter a name for your new database and click the “Create Database” button.
  3. Create a Database User: Scroll down to the “MySQL Users” section. Enter a username and a strong password, then click “Create User.”
  4. Add User to Database: In the “Add User To Database” section, select the newly created user and the new database from the dropdown menus, then click “Add.” On the next screen, select the “All Privileges” checkbox and click “Make Changes.”
  1. Navigate to phpMyAdmin: Return to the cPanel dashboard and find the “phpMyAdmin” icon under the Databases section.
  2. Select the Database: In phpMyAdmin, locate and click on the newly created database from the list on the left sidebar.
  3. Import Database File:
    • Click the “Import” tab at the top of the page.
    • In the “File to Import” section, click “Choose File” and select the SQL file from your computer.
    • Ensure the “Format” is set to “SQL” and click the “Go” button at the bottom to start the import process.
  1. Check for Errors: After the import is complete, phpMyAdmin will display a success message or any errors encountered during the process.
  2. Review Data: Click on the database name in the left sidebar to view and verify the tables and data.
  • Backup Data: Always back up your data before making any changes.
  • File Size Limits: If your SQL file is too large, you may need to adjust the upload limits in php.ini or split the file into smaller parts.
  • Error Handling: If you encounter errors, review the error messages carefully. Common issues include syntax errors in the SQL file or missing tables.

By following these steps, you should be able to successfully upload your database using cPanel.