How to export database with Adminer?

Sébastien Gicquel picture Sébastien Gicquel · Feb 10, 2015 · Viewed 24.6k times · Source

It's the first time i use ADMINER.

I want to export the database and i'm not sure to set correctly the parameters.

The database is in production and i don't want to make any mistakes.

See screenshot :

enter image description here

What are the correct parameters for :

1) Database : Use, drop + create, Create, Create + alter

2) Table : drop + create, Create, Create + alter

3) Datas : Truncate + insert, insert, insert+ update

Answer

Mark Murfin picture Mark Murfin · Feb 10, 2015

Per your comment on or original question:

I want to export the database and import it in phpMyAdmin in my local environment to test and modify my client's website.

You want to recreate the database and data in a new environment and you are exporting SQL. Therefore, you will want to create tables where none exist, or discard and overwrite data if it does exist.

To accomplish this, you want to select the following options:

Database: Drop + Create - this will cause DROP statements to appear in the exported SQL before CREATE statements. This means that any existing databases with the same name will be dropped and all tables discarded. This is what you want to do if you want a clean test environment that matches production.

Tables: Drop + Create - for the same reason as above

Data: Insert - this will insert all data from your production database into your test copy database.