Consider connected only after selecting database

Yeah, good point.