The reason I didn't suggest this method is I thought when I looked before, it writes out the table defintion, it writes out the fields in the same order. But it uses the "INSERT" statement with a fully qualified field/value pair.
So, the command would be:
mysqldump --add-drop-table -c -uUSERNAME -pPASSWORD LinksDB LinksTable > dumpfile.txt
Where LinksDB is the name of the DATABASE and the LinksTable is the name of the table you want to dump (or no table if you want to dump the whole dabase).
To dump the default values:
mysqldump --add-drop-table -c -uUSERNAME -pPASSWORD Links Links > dumpfile.txt
That would dump the Links table of the Links database into dumpfile.txt
You then rearrange the fields in he "Create" table statement -- that should be just a matter of CAREFULLY moving whole lines around. Watch the COMMAS!!
When you import the file:
mysql -uUSERNAME -pPASSWORD LinksDB < datadump.txt
It will DROP (meaning it's gone!) the old Links table, and create a new one, in the new order, and inserting the records into it.
The command above you need to make the "LinksDB" what the links database is, the "default" values would be:
mysql -uUSERNAME -pPASSWORD Links < datadump.txt
DON'T FORGET: to do a re-sync in the admin!!!
If you don't, the .def file will have the fields in the wrong order, and you will get very, very screwy errors!!!
So, the command would be:
mysqldump --add-drop-table -c -uUSERNAME -pPASSWORD LinksDB LinksTable > dumpfile.txt
Where LinksDB is the name of the DATABASE and the LinksTable is the name of the table you want to dump (or no table if you want to dump the whole dabase).
To dump the default values:
mysqldump --add-drop-table -c -uUSERNAME -pPASSWORD Links Links > dumpfile.txt
That would dump the Links table of the Links database into dumpfile.txt
You then rearrange the fields in he "Create" table statement -- that should be just a matter of CAREFULLY moving whole lines around. Watch the COMMAS!!
When you import the file:
mysql -uUSERNAME -pPASSWORD LinksDB < datadump.txt
It will DROP (meaning it's gone!) the old Links table, and create a new one, in the new order, and inserting the records into it.
The command above you need to make the "LinksDB" what the links database is, the "default" values would be:
mysql -uUSERNAME -pPASSWORD Links < datadump.txt
DON'T FORGET: to do a re-sync in the admin!!!
If you don't, the .def file will have the fields in the wrong order, and you will get very, very screwy errors!!!