partial rewrite of import_mysql, to continue processing files after an error