handle connection exceptions to mysql