mysqldump structure only

Ads
 

mysqldump structure only

Hi,

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

Thanks

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**

Ads









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 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
Advertisements
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
structure in JSP
structure in JSP  How do I achieve structure in JAVA or JSp
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
Array of structure
Array of structure  create employment details with necessary field using array of structure
structure example
structure example  in the example above what do you call the names student1,student2 and student3   Post the code
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
ModuleNotFoundError: No module named 'structure'
ModuleNotFoundError: No module named 'structure'  Hi, My Python... 'structure' How to remove the ModuleNotFoundError: No module named 'structure' error? Thanks   Hi, In your python environment you
MLM tree structure
MLM tree structure  i want mlm tree structure code in php .Please help me..... thanks in advance
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
Digit Only text field
Digit Only text field  How should we accept digits only in a textbox? (using JSTL only, without Javascript
Structure of Web Module
In this section, you will learn the structure of the web module
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
ModuleNotFoundError: No module named 'only'
ModuleNotFoundError: No module named 'only'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'only' How to remove the ModuleNotFoundError: No module named 'only' error
ModuleNotFoundError: No module named 'demo-structure'
ModuleNotFoundError: No module named 'demo-structure'  Hi, My... named 'demo-structure' How to remove the ModuleNotFoundError: No module named 'demo-structure' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'foliantcontrib.alt-structure'
ModuleNotFoundError: No module named 'foliantcontrib.alt-structure'  ...: No module named 'foliantcontrib.alt-structure' How to remove the ModuleNotFoundError: No module named 'foliantcontrib.alt-structure' error
ModuleNotFoundError: No module named 'lc-structure'
ModuleNotFoundError: No module named 'lc-structure'  Hi, My Python... 'lc-structure' How to remove the ModuleNotFoundError: No module named 'lc-structure' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'python_structure'
ModuleNotFoundError: No module named 'python_structure'  Hi, My... named 'python_structure' How to remove the ModuleNotFoundError: No module named 'python_structure' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'structure-threader'
ModuleNotFoundError: No module named 'structure-threader'  Hi, My... named 'structure-threader' How to remove the ModuleNotFoundError: No module named 'structure-threader' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'demo-structure'
ModuleNotFoundError: No module named 'demo-structure'  Hi, My... named 'demo-structure' How to remove the ModuleNotFoundError: No module named 'demo-structure' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'demo-structure'
ModuleNotFoundError: No module named 'demo-structure'  Hi, My... named 'demo-structure' How to remove the ModuleNotFoundError: No module named 'demo-structure' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'foliantcontrib.alt-structure'
ModuleNotFoundError: No module named 'foliantcontrib.alt-structure'  ...: No module named 'foliantcontrib.alt-structure' How to remove the ModuleNotFoundError: No module named 'foliantcontrib.alt-structure' error
ModuleNotFoundError: No module named 'lc-structure'
ModuleNotFoundError: No module named 'lc-structure'  Hi, My Python... 'lc-structure' How to remove the ModuleNotFoundError: No module named 'lc-structure' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'lizard-structure'
ModuleNotFoundError: No module named 'lizard-structure'  Hi, My... named 'lizard-structure' How to remove the ModuleNotFoundError: No module named 'lizard-structure' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'python_structure'
ModuleNotFoundError: No module named 'python_structure'  Hi, My... named 'python_structure' How to remove the ModuleNotFoundError: No module named 'python_structure' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'python_structure'
ModuleNotFoundError: No module named 'python_structure'  Hi, My... named 'python_structure' How to remove the ModuleNotFoundError: No module named 'python_structure' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'structure-spider'
ModuleNotFoundError: No module named 'structure-spider'  Hi, My... named 'structure-spider' How to remove the ModuleNotFoundError: No module named 'structure-spider' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'structure-tensor'
ModuleNotFoundError: No module named 'structure-tensor'  Hi, My... named 'structure-tensor' How to remove the ModuleNotFoundError: No module named 'structure-tensor' error? Thanks   Hi, In your

Ads