preload preload

phpMyAdmin: Export All Query Results

phpMyAdmin is an industry standard tool for creating and managing MySQL databases. It allows you to interact visually with the mysql databases and hide all the mysql operations behind it.

A common operation which phpMyAdmin allows, is to export the table results to the number of output formats like sql, excel, csv etc. And a common problem which most of the users face is to, export the results of the query which results in large dataset to sql or csv or excel etc.

A common solution which most of the forums suggest is to copy the query result to temporary table and then export the table. But many of you don’t know that it is also very easy to export large mysql query results without copying to temporary table.

Here are the simple steps of doing it.

1. Execute your sql query in the SQL tab of phpMyAdmin.

2. After execution, scroll down the page and look for “Query results operations” as shown in the screenshot.

phpMyAdmin Query results operation

phpMyAdmin Query results operation

3. Click “Export” link from the above and you will get the page to export all the results of the queries to desired format.

That’s it.

Liked the content? Then why not share with your pals

  • 4 responses to "phpMyAdmin: Export All Query Results"

  • Geoff
    3:35 on February 8th, 2011

    D-oh! How did I ever miss this? Thanks Deepesh!

  • Churchill
    22:08 on July 29th, 2012

    Do you have the php code to execute the exact same thing? To export it..

  • Jovi
    0:32 on September 17th, 2012

    Its possible set to export one time for week? Just execute one time for week and export a result query?

  • Amit
    13:44 on May 22nd, 2015

    I have setup LAMP environment on my local system. My PhpMyAdmin is

    When i try to export a query (from the export given at the bottom of the page), i get results : all the records from the table (or primary table in join) and not the result (or subset) of the query

  • Leave a Reply

    * Required
    ** Your Email is never shared