Krishna was the eighth son of Devaki and Vasudeva. He was born around 5,200 years ago in Mathura (in present day Mathura district, Uttar Pradesh). Based on scriptural details and astrological the date of Krishna's birth, known as Janmashtami, is 19 July 3228 BCE and departed on 3102 BCE.
Mathura, a prominent town of Northern India and the birth city of Sri Krishna was ruled by King Ugrasen, a Yaduvanshi ( Belonging to the Community of Yadavs). He was a great king loved by his subjects. He had two children, a son Kansa and a daughter Devki. Kansa was quite cruel by nature, his wickedness knew no bounds when he jailed his father and forcefully became the king of Mathura.
Though Kansa was hard hearted but he loved his sister immensely and married her off to Vasudev, one the high ranking officers in his army. However on the day of wedding, as a result of a heavenly prediction that Devki's eighth child will be born to kill him, Kansa decided to kill his sister. On Vasudev's pleading, he put both of them in dungeons and let them live but with a promise that they will handover all their children to Kansa, only to be killed by him.
King Kansa, Devaki's brother, afraid of a prophecy that predicted his death at the hands of Devaki's eighth son, Kansa had the couple locked into a prison cell. After Kansa killed the first six children, and Devaki's apparent miscarriage of the seventh (which was actually a secret transfer of the infant to Rohini as Balarama), Krishna was born.
Vasudev, His father immediately thought of his friend Nand and decided to hand over his child to him to save Krishna from the clutch of Kansa. Krishna was secretly taken out of the prison cell to be raised by his foster parents, Yasoda and Nanda, in Gokula (in present day Mathura district). Krishna grew up in Gokul and finally killed his uncle, King Kansa.