i want to use mysqldump so that it includes the statement to create database if not exists, and drop database if exists. is this possible? what options can I use?
|
feedback
|
|
You can get MYSQLDump to drop the database before creating it by adding
To your MYSQLDump command. You should already have the create database command in there. | |||||||
feedback
|
|
--add-drop-database and --database name(or --all-databases). If use mysqldump db_name --add-drop-database, DROP DATABASE and CREATE DATABASE not be added. | |||
|
feedback
|