The Andy Griffith show was filmed on a lot in California, that is true, however, there is a real town of Mayberry, and it's in North Carolina. It's near Pilot Mountain, and my mother's family is originally from around that area. I remember my parents taking me to Mayberry one time. Pilot Mountain was mentioned in the show, and that is a real mountain, in northeastern North Carolina. Just ask folk from that area, they will tell you.
The Andy Griffith Show was filmed at Culver City Studios in California. (The studio later became known as Desilu Studios.) The fictional town of Mayberry, S.C. was home to other shows as well. Episodes of Lassie, Star Trek, Ozzie and Harriet to name a few were also filmed here.
It filmed in California. There is no town of Mayberry in North Carolina but Mt Airy NC does use the show theme and that Andy Griffith is from NC as a tourist stop with snappy lunch etc. Pilot mtn is a state park(mt Pilot). It is located in the north central part of NC not far from VA border. I live south of there.