It goes without saying that one should determine if they have an allergy to bee stings before taking up beekeeping. However, even if a sting will not be life-threatening for you, there are still some things you can do to alleviate discomfort. It is important to remove the sting as quickly as possible to minimise the amount of venom pumped into the body. I’ve heard that the best way to do this is by scraping the sting out but it appears regardless of how you get it out, the most important factor is the amount of time it has been in for. Now that the sting has been removed, the pain and most of the swelling should disappear in less than an hour, although if you want immediate relief, I can recommend dabbing cloudy ammonia on the wound. This will neutralise the acid in the venom. Do not try this with wasp stings as they inject a base and you’d be better off using vinegar to neutralise those types of stings.
If you are stung whilst beekeeping it is advisable to smoke the wound before you remove the sting. This will mask the alarm pheromones bees release whilst stinging, which incite other workers to attack. When I first witnessed experienced beekeepers getting stung I found their habit to puff a cloud of smoke on the wound rather bemusing, but now I can understand what a good idea it is.