Free2Code
 
Time: 2008-11-21, 07:56pm
dumping specific tables
Subject: dumping specific tables  ·  Posted: 2005-08-25, 01:54am
Rank: ? (49)
Member #: 15507
Hi everyone,
Hope someone could help me with this.
How do I dump (to a .sql file) certain tables only from a database with lots of tables using mySQL command line?

Thanks...

 
  Reply to this ·  Post link ·  Top
Subject: Re: dumping specific tables  ·  Posted: 2005-09-30, 12:32pm
Rank: ? (2172)
Member #: 11609
You cannot dump tables using the 'mysql' binary. You must use 'mysqldump'.

Code:
  1. Usage: mysqldump [OPTIONS] database [tables]
  2. OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
  3. OR     mysqldump [OPTIONS] --all-databases [OPTIONS]


Example: mysqldump -h mydbserver.com -u root -p dbName table1 table2...

A guy gets on a bus and starts threatening everybody: "I'll integrate you! I'll differentiate you!!!" So everybody gets scared and runs away. Only one person stays. The guy comes up to him and says: "Aren't you scared, I'll integrate you, I'll differentiate you!!!" And the other guy says: "No, I am not scared, I am e to the power of x."
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons