MySQL Dump options

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

MySQL Dump options

Post by GeXus »

I'm trying to dump only the create statements from a database and only the insert statements with data, basically as two separate dumps. Any idea how to do this?

I've tried this:

Code: Select all

 
mysqldump --complete-insert database_name
 
But just say's there's an error in my sql... can't seem to figure it out.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: MySQL Dump options

Post by pickle »

There's some pretty good documentation on mysqldump. If you have access to the command line, man mysqldump would be the best place to start.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply