I need to upload data from a dump file (large one) that includes partitioning info into a database that doesn't support partitioning.
How can I tell the mysql command line to ignore the partitioning information in the dump file?
Notes:
The dump file isn't created by me. Its an auto generated backup so creating it without partitions is not an option.
The file is too large to edit manually. But adding a line to it is an option.
Thanks !
Best Answer
If your target database is an older MySQL version such as MySQL 5.0, then partitioning commands will already be ignored since they are wrapped in comments like this:
If you are loading into MySQL 5.1 or higher, then one trick that came to my mind is to change the version number in the comment section. You do not have to manually edit the dump file, you can process the file through sed. For example: