Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export database with Adminer?

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

like image 963
Sébastien Gicquel Avatar asked Feb 10 '15 13:02

Sébastien Gicquel


People also ask

Is Adminer better than phpMyAdmin?

Adminer offers permanent login including user list, phpMyAdmin only partial support through configuration. In phpMyAdmin you have to specify the number of fields prior to creating the table. The form design transposes based on the number of fields. Adminer adds fields automatically.

How do I export an entire database from the command line?

First of all open command prompt then open bin directory in cmd (i hope you're aware with cmd commands) go to bin directory of your MySql folder in WAMP program files. press enter system will export particular database and create sql file to the given location.


1 Answers

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.

like image 120
Mark Murfin Avatar answered Oct 19 '22 02:10

Mark Murfin