Learn to import a MySQL Database in cPanel
You might need to import a database when something goes wrong and you have to bring your site back i.e. to make disaster recovery. This could be when you move your site from one server to another. Sometimes, it happens when you want to restore a backup. Some people also do it when they are setting up a ready-made project on a new hosting account.
Moreover, when you import a database, you basically take the data from a file and bring it into your hosting account. Your website needs this data to work properly. Without this database, your site might not show the right information. You may even see errors on the screen.
Further, the Database stores all the important stuff your site needs to run. This includes things like posts, users, settings and more. So, when you move it to your new setup, you have to do it carefully.
Before you start to import, you must have a backup of your database. You cannot move forward without that backup file. Well, this file holds all your data safely and lets you bring your site back to life.
Let’s get started with the steps for importing MySQL database in cPanel.
How to Import a MySQL Database Backup in cPanel
Let’s go through the complete process to complete the import in the most hassle-free manner –
1. Access Your cPanel Account
The first thing you need to do is log in to your cPanel account. Open your browser and go to the cPanel login page, enter your username and password, and you will be in your cPanel dashboard.
2. Open phpMyAdmin
Then, scroll down to find the Databases section. You will see an option called ‘phpMyAdmin’ inside it. Click on it. PhpMyAdmin is a tool that lets you manage your databases easily through a user-friendly interface.
3. Select the Database
You will see a list of all the databases on your account in phpMyAdmin. Look for the one where you want to import the data. In case you do not have a database ready for the import, you might need to create one first.
4. Go to the Import Tab
At the top of the phpMyAdmin page, you will find several tabs. Click on the ‘Import’ tab. This will take you to a new page where you can upload the backup file.
5. Choose the Backup File
On the import page, you will see a section called ‘File to import’. In this section, click on the ‘Choose File’ button. This will open a file dialogue where you can browse your computer to find the database backup file you want to import.
6. Keep the Default Settings
Select the file, and you will notice a few other options below. For most users, the default settings should be perfectly fine. Leave these settings as they are. This includes things like file format and other options related to the database structure.
7. Start the Import
After that, scroll down and click on the ‘Go’ button. This will start the import process. It may take a few moments, depending on the size of the backup file.
Once the process is complete, you should see a success message on the screen. Your database is now successfully imported!