Properly close MySQL connection when done.