Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7435431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:04:22+00:00 2026-05-29T10:04:22+00:00

I am using mysql database. I am using mysqldump to create a dump of

  • 0

I am using mysql database. I am using mysqldump to create a dump of my database. I want the database to be dumped such that there is a drop database if exists command followed by create database command. I am using the following command (on my sample database project).

mysqldump --skip-comments --compact --add-drop-database -uroot -proot project

I am getting the following result:

CREATE TABLE `names` (
  `name` varchar(50) default NULL,
  `year` varchar(5) default NULL,
  `branch` varchar(50) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `names` VALUES ('Venkat','4-1','cse'),('rambabu','4-1','cse'),('nagesh','4-2','cse'),('ganesh','4-2','cse'),('rajesh','3-2','cse'),('ramesh','3-2','cse'),('sasirekha','3-1','cse'),('leela','3-1','cse');
CREATE TABLE `store` (
  `name` varchar(50) default NULL,
  `branch` varchar(50) default NULL,
  `year` varchar(50) default NULL,
  `feedback` varchar(500) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `store` VALUES ('nagesh','CSE','4-2','feedback for nagesh'),('ganesh','CSE','4-2','his performance is good. his behaviour is good.'),('rajesh','CSE','3-2','feedback of rajesh2'),('ramesh','CSE','3-2','feedback of ramesh'),('rajesh','CSE','3-2','feedback of rajesh'),('ramesh','CSE','3-2','feedback of ramesh'),('Venkat','CSE','4-1','feedback of venkat'),('rambabu','CSE','4-1','feedback of rambabu');

As you can see, i do not have the drop database and create database syntax here. What am i doing wrong??
MySqlServer ver: 14.12 Distrib 5.0.45

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:04:23+00:00Added an answer on May 29, 2026 at 10:04 am

    try this:
    mysqldump –skip-comments –compact –add-drop-database -uroot -proot –databases project

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using mysql and trying to export database through below command mysqldump -uroot
I want to backup my database using mysql dump. This is the code I
I have successfully dumped an entire MySQL database using mysqldump --databases generating a nice
I am using mysqldump to create a canonical installation script for a MySQL database.
How can I make a perfect backup of mysql database using mysqldump? When I
I'm using this command to backup a MySql database: public function backup() { $backup
I am using MySQl database. I know if I create a index for a
I am using mysqldump to backup mysql database. Now I just need to use
I am using MySql Database, I have a task that is, Any item should
When I tried to establish a MySQL database using a dump, I got the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.