How do I import a MySQL database using phpMyAdmin?
If you have a .sql file and want to import it into your MySQL database using phpMyAdmin, follow this quick and easy guide.
Step 1: Log in to cPanel
Section titled “Step 1: Log in to cPanel”- Visit your cPanel login URL:
https://yourdomain.com:2083 - Enter your username and password.
Step 2: Access phpMyAdmin
Section titled “Step 2: Access phpMyAdmin”- Inside the cPanel dashboard, scroll to the Databases section.
- Click on phpMyAdmin.
Step 3: Select the Target Database
Section titled “Step 3: Select the Target Database”- Once phpMyAdmin opens, look at the left sidebar.
- Click the name of the database you want to import data into.
💡 If you haven’t created a database yet, go back to cPanel → MySQL Databases to create one.
Step 4: Import the SQL File
Section titled “Step 4: Import the SQL File”- Click on the Import tab at the top menu.
- Click Choose File and select your
.sqlfile from your computer. - Keep the format as SQL.
- Click the Go button at the bottom.
Step 5: Wait for Import to Complete
Section titled “Step 5: Wait for Import to Complete”- If the import is successful, you’ll see a green success message.
- If there’s an error, double-check:
- The file is a valid
.sqlfile. - The database is empty (or supports overwrite).
- File size is within server upload limits (usually 50–100MB).
- The file is a valid
Troubleshooting Tips
Section titled “Troubleshooting Tips”Error: File Too Large
Section titled “Error: File Too Large”- Use SSH or MySQL command-line for large databases.
Error: Unknown Collation
Section titled “Error: Unknown Collation”- Open the
.sqlfile in a text editor. - Search and replace unsupported collations (e.g.,
utf8mb4_0900_ai_ci) with a supported one likeutf8mb4_general_ci.
Verify the Imported Database
Section titled “Verify the Imported Database”- Browse tables using the left panel in phpMyAdmin.
- Confirm your data has been imported correctly.
Need Help?
Section titled “Need Help?”If you’re facing any issues, feel free to contact our support team or open a ticket.