Volume 3, Book 36, Number 463 :
Narrated by Abu Huraira (radiallaahu `anhu)
The Prophet (sallallaahu `alayhi wasallam) said, “Allah did not send any prophet but he shepherded sheep.” His companions asked him, “Did you do the same?” The Prophet (sallallaahu `alayhi wasallam) replied, “Yes, I used to shepherd the sheep of the people of Mecca for some Qirats.”
All prophets shepherded sheep at some point in their lives. It was important for their training. Some of them are mentioned here.
Watch this video for more: