reconnect when mysql connection failed