Exporting databases and tables with phpMyAdmin Print

  • 213

This article is to teach you how you can export databases and tables with phpMyAdmin. We will assume that you are at this moment signed into phpMyAdmin, and for the goal of this article, we will use a database with two tables as our sample. The phpMyAdmin main screen is divided into two parts. The left hand side is blue, and this is where you will find your database listed. Down below the database, you will see the names of the tables that are in the database. The right hand side is a large white window, and this is where the activity takes place.

Let's begin learning how to export tables and databases. To export a database, the first step is to click on it in the left hand panel. This will open the right hand panel to a screen showing the details of the database. Now, from the menu at the top of the right hand side, click on the Export button. This will open up a new display, called View dump schema of database. There are plenty choices listed for exporting the database. One option is to export the entire database in SQL format, so that it can easily be imported later. This is an excellent way to support your database. To have this option, scroll down almost to the bottom of the box. On the left hand side, you will see a radio button and the letters SQL. Click on this. Make sure you go back to the top of the box and figure out any options you want before you move on with the export. As an illustration, you might wish to uncheck or check things like : Add Auto_Increment Value, or Add Into Comments, Creation/Update/Check Dates.

As soon as you are ready, scroll down, and check the Save as file box. Then click the Go button. You will get a pop-up asking you what to do with the file that you have chosen to open. Save to disk should be checked. Click on OK. That completes the export. The database has now been exported to your local computer.

Assuming that you only like to export a table, begin by hitting on the table name in the left hand side. That will open a window displaying the table details on the right hand side. Again, click on the Export button from the menu at the top of the window. That will open the View dump schema of table screen. You will check the SQL again, and make sure all the options you wish to mark are checked. Scroll to the bottom, and click on the Save as file. Then click on Go. The pop-up will ask what you want to do with the file. Save to Disk should be checked. Click on OK. That completes the export of the table. It has now been exported to your local computer.

Be aware that exporting a database will export all the tables, providing they are all selected, but exporting tables only exports the selected table from within a database. This ends this article. You already know a way to export databases and tables to your local computer using phpMyAdmin.


Was this answer helpful?

« Back