Recurrent aphthous stomatitis (RAS; aphthae; canker sores) is not uncommon (>20% of the population of the UK) and can be very painful and disruptive. In addition to consulting a doctor, please consider asking your dentist (dentists deal with this a lot) or a specialist of the mouth (such as an oral surgeon). It may be as simple as your toothpaste choice, or as complex as an autoimmune disorder. In any case, they should help you treat it symptomatically, and may find an underlying cause.
There are three "kinds" of RAS based on size and number of ulcers: minor, major, and herpetiform.
In addition to treating any underlying disorder, common recommendations - among others - include maintaining good diet (with some attention to B12), oral hygiene, avoiding toothpastes with SLS, and possibly using mouthwashes containing chlorhexidine or triclosan.
For the occasional aphthous ulcer, there is a sticky paste you can apply to the ulcer called Orabase. It has a topical anesthetic and temporarily relieves pain, so that you can eat, sleep, etc. There is also a viscous lidocaine 2% solution which can be swished/spit. The downside of this is that you can't taste anything, as your tongue gets numbed as well. Alternatively, you can apply it to the lesions with a Q-tip.
Under the supervision of a physician, topical corticosteroids can sometimes control symptoms that are incapacitating. There are corticosteroid preparations in orabase, gels, and other.
There are prescription antibiotic oral preparations with which one can rinse and spit, usually containing a tetracycline derivative, or tetracycline plus nicotinamide which may provide relief and reduce ulcer duration and recurrence. If RAS fails to respond to these measures, oral immunomodulators may be required, again under specialist supervision.
Complementary and Alternative Medicine recommendations include vitamin supplements, bee propolis, various herbs, and honey.
Oral medicine — Update for the dental practitioner Aphthous and other common ulcers
Treatment strategies for recurrent aphthous ulcers
A double blind, randomised placebo controlled trial of topical 2% viscous lidocaine in improving oral intake in children with painful infectious mouth conditions
Aphthous ulcers (recurrent)
Cyanocobalamin May be Beneficial in the Treatment of Recurrent Aphthous Ulcers Even When Vitamin B12 Levels Are Normal.
Stomatitis <- an Unbound Medicine 5-minute Clinical Consult