How To Import MySQL Database Into phpMyAdmin Quickly?

how to upload mysql database to server

Do you know how to import database in MySQL using the phpMyAdmin? When you restore your website to your web hosting then you would need to import the backup of the database. Sometimes when bloggers move a website from localhost to the online server, they upload the database from their hard drive to the web hosting server.

You would need to do this import-export task many times while handling your website. What would you do if your website gets hacked? On such situation, you export the database to keep it safe. After clearing the hack, you import the database again.

How To Upload MySQL Database To Server?

In this post, I am going to guide you to upload the database from your computer to the online server. Before importing, I believe that you have kept the backup of the database in your computer and the new database has been created.

If not, then create a new database in which your old database would be imported. I hope you can do that within few minutes by going to the MySQL database wizard.

The steps to import database in MySQL:-

Step 1:- Login to your cPanel and go the database section. From all the options, click on the “phpMyAdmin“.

import database in mysql

Step 2:- A new tab would open in your browser from which you have to select the database name you have created. It can be done from the left-hand-side menu. Click on the name of the database.

Step 3:- Click on the “import” option from the above shown horizontal navigation menu. After that, you have to choose the database file stored in your computer by clicking on the “choose file”.

 how to import mysql database into phpmyadmin

Step 4:- After selecting just scroll down the page and click on the “Go” button. The upload of the database would get started. Depending upon the size of the database and the speed of your internet connection, the database would get uploaded to the server.

NOTE:- After uploading the database to make it run properly, you have to edit the wp-config.php file to change the database name, username etc according to the new database you have created.

If you won’t match the database credentials then you would get “error establishing a database connection” in your browser while opening the URL of your website.

After editing the wp-config.php file, if your website is opening in the browser then it signals that the connection of the database has been established successfully. Now you can write the blog posts freely.

Do You Know How To Import Database In MySQL?

The guide shown above can help you to complete your task. There is nothing complicated while importing the old database to the new database. Using this method you can upload the database up to the size of 50MB. If you have the larger database then you have to use the command line method.

Though the size of the database doesn’t reach to the 50MB so easily. It would take years. But still, you should know how to import MySQL database into phpMyAdmin. If you face any problem then let me know.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.

Get Free Updates Into Your Inbox

Learn Everything Just Like I Did


Leave a Reply

Your email address will not be published. Required fields are marked *