If you're having shell access to the server, you might also try this:
mysql -uusername -ppassword -t database_name < path_to_file/filename.sql
This will execute all the commands from the .sql file "directly". Should be very fast, and doesn't require any 3rd party lib.
Unix geeks will easily tell us how to import all sql files this way with a single line command using find and pipe or however that's called
You could also write a Perl script which creates a list of sql files and makes system calls for each file. I'll post such a script here ASAP.