As this pre dates the Civil Registration there are only Birth/Baptism Records.
Aglish Parish covers the Castlebar Co Mayo area. There is a record of a Joseph McDonnel 07 March 1839 in Aglish Parish parents Walter McDonnel and Sara MacMahon the sponsors were Michael Killeen and Bridget MacDonnel.
You must remember that the years of birth shown in Census records are mostly guess espically on the only 2 Irish Census records available, also the surnames are often changed McDonagh,McDonnell,McDonough MacDonald all can be changed on emigration.
There are many families in Castlebar in the 1901 census.