There are several non-prescription medications that may help. Some ointments or liquids contain topical anesthetic pain relievers like benzocaine. Other pain relievers, like menthol or phenol also work, but can irritate and damage the tissue if used for too long. Some products are promoted to stop the growth of the Herpes virus. These are intended for use against cold sores.
Some products contain sunscreen agents.
Others are made so that they will stick to the wet tissue inside the mouth. They provide a coating film to help keep the sore from further irritation. Severe cases of cold sores may require a prescription ointment or even a powerful prescription that is swallowed. As with all powerful prescription drugs, there is a risk of side effects, and therefore these medications should not be used unless truly necessary. Ask your medical provider or pharmacist for a recommendation.