Taking Tylenol on Shabbos or Yom Tov might be a problem, even if it isn't a fast. So maybe Tisha b'av would have a different din (since you don''t have the gzeira of grinding herbs).
Great point, I don't know how I missed that. However Rabbi Farkash of Yirushulayim says that if the pain reaches a point that it would make you go to bed you are permitted to take medication.
I don't know if that applies to Yu"k though, even though it was Shabbos, since the Heter is based on "Mitzvah Liango Bachilah Ushtiya" and the ache will not let you do so --which obviously doesn't apply for Yu"k.
However my gut feeling is that if the choice is a splitting headache or Davening like a mentch, any ruv will give you the Heter.