phpMyAdmin is a tool available in cPanel that makes it easier to manage, edit, import, export & do more with your MySQL database.
In this tutorial we will show you how you can import your MySQL database from your localhost to the server using phpmyAdmin in few simple steps.
But before importing your database, you need to to take note of the following:
1) You must already have existing database for importing SQL file to it. If you have not already created a database then you need create a MySQL database first.
2) You also must have the .sql, .zip, .gzip file of your database offline in your PC/Laptop that you want to import on server.
Steps to Import your MySQL database using phpMyAdmin:
To import your database in your cPanel using phpmyadmin, you need to follow the following steps:
Step 1) Login to your cPanel
Scroll down to "Databases"
section in your cPanel and click on "phpMyAdmin"
Now you will be redirected to the phpMyAdmin interface. In here you will see the list all your databases on the left hand side of the phpmyadmin panel.
Now from the list of databases on the left side menu in the phpmyadmin panel, you first need to select the database
in which you want to import your data as shown in the screenshot.
To import your data or tables in your database you must have an existing database already created in your cPanel. If you have not already created a database then you can create it using our How to Create a database in cPanel Guide
After selecting database, click on the "Import"
button available at the top menu of the navigation bar.
Now click on "Browse"
button to upload your database file from your PC/Laptop.
Database upload file must be in compressed format like ".zip, bzip2, zip" or in .sql
Browse to database file in your PC/Laptop in the pop-up window. After navigate to your database file click on "Open"
to upload it to the server.
Once your database file is uploaded, scroll down click on the "Go"
button at the bottom of the page.
Your database is now successfully imported. You will also see the success message if the database was imported without any error.