mySQLdump Complete Insert

By Hawkee on Mar 28, 2007

This is more of a note to myself, but I use it to dump databases where there are additional fields in the new table. When you're upgrading a database you can either add the new fields to the old table or move the data from an older table to a newer one.

I usually like to add the new fields, but when it's a major upgrade I just start with a fresh, current table. That's where this code comes in handy. You use this to dump the data from the older table. That way it can be inserted into the newer table without any hassles over an incompatible number of fields.

mysqldump --complete-insert database table > table.sql

Comments

Sign in to comment.
Hawkee   -  Aug 24, 2008

This is really just a command line call that will give you a dump of your mySQL database. It's helpful for importing older data into a newer structure.

 Respond  
Eugenio   -  Aug 24, 2008

rofl

 Respond  
Gummo   -  Aug 24, 2008

Edit: Didn't mean to comment. -.-

 Respond  
Joshuaxiong1   -  Aug 24, 2008

huh?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.