Mysqldump only certain fields of a table

The trick here is to not use mysqldump

[code]mysql -u root -p -e “SELECT `field_01` AS ‘new_name_01`,`field_02` as `new_name_02` FROM database.schema” -X > /tmp/output.xml[/code]

And to load it back into the new table which exists and has the fields new_name_01 & new_name_02:

[code]mysql -u root -p –local-infile -e “LOAD XML LOCAL INFILE ‘/tmp/output.xml’ INTO TABLE database.new_schema ROWS IDENTIFIED BY ‘<row>’;”[/code]

Cool Duplo Project #10 – Falling Dominoes

[mejsvideo mp4=”http://ben.akrin.com/videos/IMG_5031.MOV.mp4″ ogg=”http://ben.akrin.com/videos/IMG_5031.MOV.ogv” webm=”http://ben.akrin.com/videos/IMG_5031.MOV.webm” poster=”http://ben.akrin.com/videos/IMG_5031.MOV.jpg” width=”640″ height=”360″]