Closed all MySQL connections properly