welcome to HCM.
Pain during urination with brown discharge indicate some sort of infection probably Urinary Tract Infection
or liver dysfunction.
Do a fresh Urine analysis along with Liver Function Test.Check the result and consult with your doctor.
You may take some antibiotics like Ofloxacin
combined with Metrogyl
+urine alkalizer like Syp Uriliser or Alkarex (+/-) antispasmodic med.
Also drink plenty of water with glucose,maintain personal hygiene,empty bladder timely and wear cotton underwear.