If you really need it, tylenol is safe every once in awhile. Don't take motrin, or anything with ibuprfin, it causes heart defects. What helped me most with backache was a simple prwgnancy exercise called pelvic rocking. It helps reposition baby off your back
I'm a migraine sufferer whom before being pregnant took a daily prescription. For headaches my Dr. suggested a daily cup of coffee to ward them off if that didn't work 1 Tylenol every 6 hours as needed. Honestly I'm totally afraid of harming my baby so if I've taken 3 Tylenol in 32 weeks it's alot. Def ask your Dr or the front desk a list of meds you can take while pregnant they should have one readily available. I know Tylenol, Benadryl & Tums was on that list.
It's not safe to take pain killers while your in first trimester as it could cause miscarriage. Best to wait until your a bit further along. I'm 6 months and have never took any painkillers