0

I am trying to backup my MySql databases on Windows via a batch file. It works fine. but i want to remove the default use "database" and create "database" command.from that .sql file which is by default created while creating backup.

these are the lines i want to remove before taking backup for each .sql file

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `database name` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE database name;

0

2 Answers 2

1

Ya I got the answer from mysql official site. I have used '--databases' in my batch file. to backup all databases.present in server. just removing that and now it works fine.

Sign up to request clarification or add additional context in comments.

Comments

0
--no-create-db

Do not write CREATE DATABASE statements

https://dev.mysql.com/doc/refman/5.6/en/mysqldump.html#option_mysqldump_create-options

1 Comment

Thank's For your reply but how to remove use "database".

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.