I rember some poor guy who spent several years in Tanzania, then moved back to London, within a few days of arriving he'd been mugged and roughed up.
Keep your wits about you and you will be fine. I've seen and experienced bad things, but on the whole I consider Tanzania one of the safer places in Africa to live.