Handle disconnects from MySQL server