Although there’s not much good research, doctors agree that antibiotics can help clear up mastitis that's caused by a bacterial infection. Your doctor might prescribe antibiotics if you've tried breastfeeding using your affected breast first but your symptoms haven’t eased after 24 hours.  The antibiotics that doctors prescribe for mastitis will not harm your baby.
Antibiotics that doctors use to treat mastitis include amoxicillin, cefalexin (brand names include Ceporex and Keflex), cefuroxime (Zinnat), cefradine, and erythromycin.
You’ll usually need to take antibiotics for between 10 days and 14 days.  Taking them for less time than this may increase the chances of mastitis coming back. 
We found one small study that looked at using antibiotics plus breastfeeding to treat mastitis caused by a bacterial infection. It found that women who had this treatment were more likely to be cured after two weeks than women who only breastfed or who had no treatment.  
Another small study found that the antibiotics amoxicillin and cefradine worked equally well in women with mastitis that was due to an infection.  Symptoms in women treated with either of these antibiotics cleared up after four days, on average. It’s important to keep taking your antibiotics even after you start to feel better, as there’s an increased risk of getting an abscess if you stop treatment early.
Antibiotics are safe to use when you’re breastfeeding. However, they can cause mild side effects for you, such as diarrhoea, headaches, and feeling sick. 
A couple of studies have looked at whether giving antibiotics to women with cracked or sore nipples can help prevent mastitis. However, the studies were too small to tell us whether this might help. 
You get an infection when bacteria, a fungus, or a virus get into a part of your body where it shouldn't be. For example, an infection in your nose and airways causes the common cold. An infection in your skin can cause rashes such as athlete's foot. The organisms that cause infections are so tiny that you can't see them without a microscope.
For more terms related to Mastitis
For references related to Mastitis click here