phpMyAdmin: How to Import and Export Data using phpMyAdmin

phpMyAdmin: How to Import and Export Data using phpMyAdmin

In this post I would like to how can we Import or Export MySQL data using phpMyAdmin.

Topics will be covered in this tutorial:

a.) Import and Export Data.

b.) Export particular selected rows.

c.) Export rows from a particular index(Primary ID).

Import and Export Data:

To import and Export data from phpMyAdmin is very easy just you will get it on a few clicks. Just follow the steps.

To Export Database/Table:

1. Select the database or table you want to import.

Mysql database

2. Click on Export button from top menu.

Export Option in Mysql phpMyAdmin

3. Click on “Go” Button and the download will be start. Before export, custom option you can select For ex: If you want to export only data you can choose the data option so that only records will be exported from the database or table you have choosen.

To Import Database/Table:

Before Import using phpMyAdmin Some of the things you need to remember.

  • Make sure the tables is not exists into database, if the create structure you already have in sql file.
  • Make sure that the same primary key(Unique ID) records is not present in sql file which is already present into database table other wise it will produce error of duplicate entry.

Follow these simple steps to Import using phpMyAdmin.

1. Go to the database.

2. Click on Import option from top.

Import Option in phpMyAdmin

3. Choose the sql file to Import.

4. Click on Go Button. If everything is Ok, then Import will be successfully done.

Export particular selected rows:

To Export particular selected rows from database table you need to select rows you want to export. Please Find Below the screen to understand better how to achieve this.

Export Particular Selected Rows Using Phpmyadmin

Export rows from a particular index(Primary ID):

You can also export data from a particular ID of a table. By running a simple query it will be easy to get all records from a particular Id and after that you can export it.

Query: SELECT  * FROM `table_name`  WHERE id > 27

Export Data From a Particular Id

Thank you for reading this post. we hope you like this Post, Please feel free to comment below, your suggestion. if you face any issue with this code let us know. We’d love to help!