Chief Minister B.S. Yeddyurappa on Thursday announced a ban on export of iron ore from Karnataka , saying that it was the only way to stop illegal mining in the state.