Knowledge Walls
John Peter
Pune, Maharashtra, India
Dumping Table in MYSQL in Mysqldump of MySQL
3069 Views
Example
mysqldump -u root -pmysql -h localhost table_schema_name table_name > file_name.sql
Dumping Multiple Tables
mysqldump -u root -pmysql -h localhost table_schema_name table_name_1 table_name_2..  > file_name.sql
Dumping only Create table
mysqldump -u root -pmysql -h localhost table_schema_name table_name --no-data > file_name.sql

-- How to take in different way
SHOW CREATE TABLE table_name;
Dumping only Data from a Table
mysqldump -u root -pmysql -h localhost table_schema_name table_name --no-create-info > file_name.sql
How to dump a table from host to host using MYSQL
mysqldump -u root -pmysql -h from_host from_db table_name | mysql -u root -pmysql -h to_host to_db
Dumping table with --where condition
mysqldump -u root -pmysql db_name table_name --where="id > 1000" > file_name.sql
Dumping All Table's of DB and Ignore Few Table's
mysqldump -u root -pmysql db_name --ignore-table=table_name_1 --ignore-table=table_name_2 > file_name.sql
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details