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.
To import your database in your cPanel using phpmyadmin, you need to follow the following steps:
Step 1) Login to your cPanel.
Step 2) Scroll down to “Databases” section in your cPanel and click on “phpMyAdmin” icon.
Step 3) 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.
Step 4) 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.
Note: 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.
Step 5) After selecting database, click on the “Import” button available at the top menu of the navigation bar.
Step 6) Now click on “Browse” button to upload your database file from your PC/Laptop.
Note: Database upload file must be in compressed format like “.zip, bzip2, zip” or in .sql format.
Step 7) 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.
Step 8) Once your database file is uploaded, scroll down click on the “Go” button at the bottom of the page.
Congratulations! Your database is now successfully imported. You will also see the success message if the database was imported without any error.