re-authenticate and re-select database when disconnect