Reconnect to mysql after connection lost.