Skip to content

Instantly share code, notes, and snippets.

@mlbright
Created July 12, 2012 15:58
Show Gist options
  • Select an option

  • Save mlbright/3099015 to your computer and use it in GitHub Desktop.

Select an option

Save mlbright/3099015 to your computer and use it in GitHub Desktop.
script to convert a MySQL 4.0.23 dump file to be usable in 5.x
#!/usr/bin/env perl
# Filters a mysql dump file to migrate from 4.0.23 to 5.x
use strict;
use warnings;
while (<>) {
s/TYPE=MyISAM/ENGINE=MyISAM/g;
s/timestamp\(14\)/timestamp/g;
s/TYPE=ISAM/ENGINE=MyISAM/g;
print;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment