Urine infection sometimes hurts when urinating

Patient: I am 77 years of age and having problem with retention of urine which also sometimes causes me pain when urinating. I gave up sex when I was 67 so it can’t be an infection from that. Will a course of antibitics do and what sort should I buy?

Symptoms: Before excessive mucas