From http://stackoverflow.com/questions/9497869/export-and-import-all-the-database-from-mysql-at-a-time