How did you convert the text into tables?

Judicious use of the LOAD DATA statement and some bit of fiddling with the original text files.