I'll agree that planning and situational awareness are the key things here. Take what you need, watch what you do, watch the situation and take a companion!
Two sets of eyes are always better than one. I don't normally go out with someone else when I go shooting (with cameras, that is); however, if I was going somewhere I didn't feel safe, you bet your bottom dollar I'm taking someone with me, even if they're not interested in photography.
On to weapons. First off, if you carry any weapon, it is NOT, I say again NOT to protect your gear. It is to protect YOURSELF (and in most states of the Union, protection of others). If a mugger wants your camera, give it to them. If they want your wallet, give it to them. If they want your car, give it to them. The only time a gun comes out of a holster is when you are in imminent danger of serious bodily harm or death. (And yes, if you carry, for God's sake, use a holster.)
If you carry, hell, if you even own a firearm, become extremely familiar with it. Shootings are almost always at a range of a few feet, and also extremely high-stress situations. Consequently, it's easy to miss, drop your weapon, or have any other number of extremely BAD things happen (for the record, those two qualify as pretty close to the worst possible things to have happen). Training with your equipment is extremely crucial, and I'm not talking just target practice, but actual "tactical" training. There's a lot of stuff to do between saying "Oh, ****!" and squeezing the trigger, and you'd be surprised how little time there is to do it, especially when you're not expecting it, which you probably won't be.
Also, if you're going to spend thousands of dollars on camera gear, and hundreds of dollars on a firearm (and if you're smart, training), plus whatever it costs to obtain a carry permit; then do yourself a favor and spend another hundred or so on an hour or two of time with an attorney who is well versed in self-defense and deadly force laws. I am absolutely amazed that people do not do this, thinking they know all there is to know about the law. I cannot emphasize this enough.
I'm not saying "get a gun" or "don't get a gun." That's your choice and your right to make that choice. However, whatever you do, do it wisely and make yourself fully aware and competent. It is not a game, and it is not the movies.