Loading...
X

How to change default export settings in phpMyAdmin

phpMyAdmin has handy tools for exporting databases or individual tables. All this can be done in the web interface without using the command line.

To export a table, click on its name on the left side of the phpMyAdmin window, and then go to the “Export” tab.

A window with two export methods will be shown:

  • Quick - display only the minimal options
  • Custom - display all possible options

By default, “Quick” is selected and if you press the “Go” button, the file with the database in SQL format without compression will be downloaded.

I think many people have their preferred database export settings, which they change by switching to the “Custom” export option.

For example, with each export, I choose compression for the database, since the size of the databases decreases significantly. This helps to download and upload databases to servers faster, as well as bypass PHP restrictions on the size of the processed file.

I thought, why not make compression (or any other setting you need) the default option, so that without switching to the “Custom” export method, download a table or database with one click?

It turned out to be quite simple!

Go to the export tab and click that gear in the corner:

A window will open in which you can set any default settings. For example, I chose to use zip compression by default. When everything is ready, click the “Apply” button.

That's all! Now every time you export a database or table to phpMyAdmin it will be compressed into an archive, or any other default settings of your choice will be applied.


One observation on “How to change default export settings in phpMyAdmin
  1. Edgar Walkowsky

    I found that you cannot adjust the default export settings from the export page, so I added some JS code to the end of export.twig. The location of where to place the code may vary in different PHPMyAdmin versions.

    <script>
    $('#radio_custom_export').prop('checked', true);
    $('#radio_view_as_text').prop('checked', true);
    $('#checkbox_sql_auto_increment').prop('checked', false);
    $('#checkbox_sql_include_comments').prop('checked', false);
    $('#checkbox_sql_truncate').prop('checked', true);
    $('#checkbox_sql_drop_table').prop('checked', true);
    </script>
     

    You can modify the above checks, or add others to your needs.

     
    Reply

Leave Your Observation

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