How to export result of a MySQL query using phpMyAdmin 3.4.3?

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

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

  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.


Instead of the export button at the top of the GUI, use the one at the bottom, within the "Query results operations" box. That is the one you want.

Export button


On some query it's not possible in a direct way.

You must write the query result to a table through the create table as syntax And then you can follow the normal export instructions: https://serverfault.com/a/300342/256884


You've already got the query? You can insert into a new table using another query's results

Looks like the steps you need:

  1. Create the new table with all the columns.
  2. INSERT INTO newTable (field1, field2, field3) SELECT field1, field2, field3 FROM otherTable GROUP BY field1

Adjust for your 50-line query.