Hello shubh;
welcome to HealthcareMagic
Pain while passing urine can be due to infection of
urinary tract and even due to infections like
gonorrhoea.Since you have a history of a white liquid it needs to be seen if the liquid is semen or a fluid coming due to infection.Get examined by a doctor and even get a urine routine done to rule out Urine infection.The doctor will prescribe some antibiotic for the infection after examination and you should be fine in few days.
Take care.
Thanks