Share on Google+Share on Google+

Deepak Kumar
mysqldump structure only
2 Answer(s)      6 years and 3 months ago
Posted in : SQL

Hi,

How to take dump of database structure only? Provide me the syntax to take mysqldump structure only.

Thanks

Ads

View Answers

January 15, 2011 at 10:22 PM


Hi,

You can use -d option with mysqldump command to take the structure only backup of database.

Here is the complete example:

mysqldump -d -uroot -proot mydatabase > mydatabase.sql

Thanks



January 16, 2011 at 10:49 AM


Hi,

mysqldump client is a backup program which can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both. However, mysqldump can also be used to generate files in CSV, other delimited text, or XML format.

To take dump of a mysql table use below command

~/mysql/bin/mysqldump -u root database_name ORDERS > orders.txt

1. command to dumb only tables definitons , not the data ? use ?d command? if path is not set then you need to run that command from mysql/bin directory

./mysqldump -d -u root database_name ORDERS , CLIENTS , COMPANY > ~/tmp/test.database.sql

2.Command to receate table from that file

mysql -u root database_name < ~/tmp/test.database.sql

to read more about it see here **Deleted**










Related Tutorials/Questions & Answers:
mysqldump structure only
mysqldump structure only  Hi, How to take dump of database structure only? Provide me the syntax to take mysqldump structure only. Thanks   Hi, You can use -d option with mysqldump command to take the structure only
Mysqldump one table - Taking dump of only one table
Use of mysqldump for taking backup of one table In this section you will see the example of mysqldump function which takes the backup of only one table... The mysqldump is very handy tool, it can be easily used to take the backup of only one
Advertisements
mysqldump all databases
mysqldump all databases  How to take the backup of complete data... on a MySqL Server you use the mysqldump tool. You have to logon to the server where MySQL is running and use the following command on console: mysqldump --all
Backup Failed Mysqldump Got Errno 28 On Write
Backup Failed Mysqldump Got Errno 28 On Write  Hi, While taking the backup of database I got following error: Backup Failed Mysqldump Got Errno 28 On Write How to resolve the issue? Thanks   Hi, This error comes
backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5
backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5  backup your MySQL data using mysqldump:cPanel MYSQL 5.1 to 5.5
structure in JSP
structure in JSP  How do I achieve structure in JAVA or JSp
structure example
structure example  in the example above what do you call the names student1,student2 and student3   Post the code
Array of structure
Array of structure  create employment details with necessary field using array of structure
Data structure
Data structure: How to sort numbers in a queue using a bubble sort method?  How to sort numbers in a queue using a bubble sort method
C Structure
C Structure  Respected sir, Can a structure in C contain a pointer to itself ? if yes means how sir ? plz help me sir
inbox structure
inbox structure  I want to create an inbox for my project in which records are to be fetched dynamically. I am using netbeans (jsp + javascript+ servlet.) The structure is same like yahoo inbox (1st column full of check boxes
tables to structure forms
tables to structure forms  How can I use tables to structure forms
tables to structure forms
tables to structure forms  How can I use tables to structure forms
use tables to structure forms
use tables to structure forms  How can I use tables to structure forms
use tables to structure forms
use tables to structure forms  How can I use tables to structure forms
MLM tree structure
MLM tree structure  i want mlm tree structure code in php .Please help me..... thanks in advance
Mlm tree structure
Mlm tree structure  i want mlm tree structure code in php with jquery or Ajax
Mlm tree structure
Mlm tree structure  i want mlm tree structure code in php with jquery or Ajax
Mlm tree structure
Mlm tree structure  i want mlm tree structure code in php with jquery or Ajax
What is the structure of Spring framework?
What is the structure of Spring framework?  What is the structure of Spring framework?   Hi, In Java Spring framework offers one-stome... Framework structure this link. Thanks
Directory structure of a web application
Directory structure of a web application   Explain the directory structure of a web application.    The directory structure of a web application consists of two parts. A private directory called WEB-INF. A public
cylinder tree structure
materials in a hierarchical structure in a cylinder form. for example my interface... code to create the tree structure. your advice will be very very appreciated
Structure of Web Module
In this section, you will learn the structure of the web module
MySQL Directory Structure
MySQL Directory Structure       MySQL provide the biological sequence database suitable for large scale sequence search the approaches as well as mysql table. These table dumps
EJB directory structure
EJB directory structure       The tutorial is going to explain the standard directory structure of an EJB... the servlet and JSP pages. Figure: EJB Directory Structure in NetBeans Above
Directory structure in hibernate for stand alone application - Java Beginners
Directory structure in hibernate for stand alone application  Hi, Please tell me directory structure of hibernate using only stand alone application
PHP Alternative Control Structure
Alternative Control Structure: PHP provides alternative ways to use control... structure we can replace the opening brace with a colon(:) and the closing brace... coding within any control structure, the examples are given below: elseif
Tree Structure Catalogue Menu Display
Tree Structure Catalogue Menu Display  How best can I display a tree structure for a catalogue menu ? One option is to use an applet, but theres a 30000 node limit to the one im using. Is there any way other than an applet
REGARDING TREE STRUCTURE IN STRUTS - Struts
REGARDING TREE STRUCTURE IN STRUTS  Hello friends, I need ur help its urgent requirement. I need a dynamic tree structure format i.e I have created... in the database should be shown in the jsp(struts) as an tree structure form
C Structure Pointer
C Structure Pointer       This section illustrates you the concept of Structure Pointer in C. You... through structure pointer. For that, we declare the structure type st consisting
Digit Only text field
Digit Only text field  How should we accept digits only in a textbox? (using JSTL only, without Javascript
Tutorials   
Java Spring Hibernate Struts Training How to Fetch Data using dropdown option How to get day from date in SQL? Example of sorting results in MySQL Distinct and Limit example in MySQL How to download install and use MySQL workbench? Example of Average, Sum, Min and Max functions in MySQL How to delete data from MySQL? Update SQL Query Example Order by example in MySQL AND and OR Operators in MySQL Query Where clause with query in MySQL How to use select Statement in MySQL? How to insert data into MySQL Table? Create Database and tables in MySQL example of before insert trigger in mysql Failed to Call Procedure MY Sql Query Error - Not able to Understand the issue which query will be run for previous(button) question How to access data yearly from DB in C# ? Fastest way to upload huge raw data in database - c#, Java or stored procedure DB Insert Nb hours between 2 time stamps meets specific criteria mysql select into table from another table example MySQLselect into new table Example code How to create a .mdf file from script (.sql) Please help me out fixing broken relational links in MySQL database after an upgrade How do I upgrade mysql? mysql 4.x to 5.x upgrade problem Upgrading a PHP/MYSQL application? upgrading sql query join phpmyadmin in whm whm php version update php cpanel cpanel mysql downgrade cpanel mysql version upgrade mysql whm upgrade mysql 4 5 cpanel upgrade mysql cpanel server Did my upgrade from mySQL 5.1 to 5.5 work Upgrade to MySQL 5.5 ? - cPanel Mem use upgrade from MySQL 5.1 to 5.5 - cPanel Upgrading MySQL from 5.0 to 5.1 or 5.5 - cPanel Mysql Upgrade on WHM (Mysql 5.1 to 5.5)cPanel Mysql Upgrade on WHM (Mysql 5.1 to 5.5) - cPanel Updating from MySQL 5.0 to 5.5 cPanel MySQL 5.1 upgrade to 5.5 error Charset problem upon publishing PHP + MySQL website MySQL issue: Table 'data_dictionary.CHARACTER_SETS' doesn't exist SQL Error Version 5.5.15

Ads

 
Advertisement null

Ads