[CLUE-Tech] mysqldump question

Russell Glissmann rglissmann at rfgsolutions.com
Tue Sep 21 07:15:27 MDT 2004


Well, depending on whether or not you want just the data, you can use
MysqlDump.  Use the -t option which only gives you the table.  However,
it still appends insert statements to the beginning of each line. 
Another way would be to use the mysql utility, and redirection.  Create
a file containing a simple line like "select * from foo".  Save it. 
Then use mysql -u user -p dbname < filename > output file.  There is
probably a way to do this on one line also, but I know this works.

Russ
On Mon, 2004-09-20 at 21:32, Jeff Cann wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> How do I export only the data from the tables within a database?
> 
> The mysqldump utility only seems to want to generate tables (DDL) and data if 
> I provide the --all flag.  I want the inverse - no table definitions and only 
> data.
> 
> mysqldump doesn't seem like it does this, based on the man page.
> 
> I appreciate suggestions.
> 
> Thanks,
> Jeff
> - -- 
> "Faith that does not affect a person's culture is a faith not fully embraced, 
> not entirely thought out, not faithfully lived."
> - - Pope John Paul II
> 
> http://isuma.org/
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> 
> iD8DBQFBT6Dri4b9OApLCmoRAjXYAKCZSrnuspYun311E0l7k4b0UzHu7ACgqhnq
> w/xakTKRLh3PA5bR8WLsPu4=
> =9kQG
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> CLUE-Tech mailing list
> Post messages to: CLUE-Tech at clue.denver.co.us
> Unsubscribe or manage your options: http://clue.denver.co.us/mailman/listinfo/clue-tech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue-tech/attachments/20040921/72b16100/attachment.html


More information about the clue-tech mailing list