Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have quite large and rather important DB to backup.

First off, whats best way to do it?

Secondly, easiest way I know is to export it through phpmyadmin, but, i'm worried about options, although I'm quite sure this "Add DROP DATABASE" will not drop actual databases, I'm interested what are these options for? (see pic)

Thanks.

enter image description here

share|improve this question

migrated from stackoverflow.com Apr 16 '13 at 16:05

This question came from our site for professional and enthusiast programmers.

    
Adding DROP DATABASE will create code to drop the database before creating it. PHPMyAdmin creates backups by writing code that INSERT's the data into your DB. You can try out all the statements, PHPMyAdmin will just generate the SQL code to do the backup. You have to execute the query before something happens :) –  Morten Jensen Apr 16 '13 at 12:02
    
You mean it will generate code for those along with insert code (which is backup)? What are those for, in first place? –  el ninho Apr 16 '13 at 12:05
    
It will insert DROP statements before the INSERTs. Sometimes that's useful for filling up a DB with certain data before a test-run or whatever. –  Morten Jensen Apr 16 '13 at 12:34
    
So it will bi used for droping db/tables in case of restoring? Thanks. –  el ninho Apr 16 '13 at 12:35
2  
Yes, but you can try out the different settings and see what difference it makes in the output SQL :) –  Morten Jensen Apr 16 '13 at 12:36
add comment

2 Answers 2

up vote 2 down vote accepted

The best (and IMO the only suitable) tool for backuping a MySql database is mysqldump

The PhpMyAdmin options you are referring to are meant only to alter the generated statements in your dump (but will not touch your actual data). You might want to refer to this FAQ at PhpMyAdmin.

share|improve this answer
add comment

simply create a dump file of your database. mysqldump can be created very easily in phpMyAdmin. at the home page of the database in phpMyAdmin, click export and select quick or custom as your choice and dump it into sql file format. A simple dump of your database would be created and then you can easily restore it again.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.