End mysql connections after they've completed. Closes #46