I would like to clear one thing that there is no medicine as such which induces pain. If any drug cannot lower the pain, it's fine but it cannot induce pain. The medicine might not be so strong to counteract your infection & due to which the infection is aggravating and leading to increased pain.
Next Steps
Visit a dentist again & get the needful treatment done to counteract the infection. Only medication is sometime not enough. Dental problems are not like cough & cold which reverses with medication. There is a n infection or physical damage, which require some procedure to correct it.
Health Tips
Don't rely on just medication, go for the appropriate treatment.