1

As a rule, I always drop the database, and then create a new one and only after that restore a dump file. But I'm wondering, is it necessary to do?

For example, if I lose some data and begin to restore my database, why I cannot just to restore it, like in MS SQL, without deleting it first?

asked Jan 11, 2017 at 11:24

1 Answer 1

1

Read the first few lines of the dump -- Does it say DROP DATABASE or anything like that?

(There are many options on mysqldump that control whether drops, creates, etc, are emitted into the dump, so there is no single answer to this question.)

answered Jan 11, 2017 at 22:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.