Did you not record/note down how the original light was terminated? [b]SCHOOLBOY ERROR![/b] OK, it is likely that not all the black cores will be neutral (does one by any chance have red sleeve or red mark on it?) Do you have any test equipment that can measure continuity and voltage? As without now testing, it is total guesswork!
What you have is a loop in set-up. This is where the live, neutral, earths and switch lines are brought to the ceiling rose. Normally (but not always, as we do not know who installed it and if they installed normally!) My disclaimer! So normally: All the reds would be contacted together as a live loop (this is not the live of the new fitting but a loop that is not directly connected to the light fitting, but some light fittings do supply a spare terminal for the loop! All the green/yellows are earth/CPCs and do get connected together at the earth terminal of the light. This where it gets tricky two of the blacks will be expected to be neutral but one may well be a switch line, that is where you now need to ID which is which. As connecting a switch line to a neutral loop, is going blow the circuit.
If you have two grey sheathed cables and one white, then if you take a look at the switch plate wiring this could give a clue!
The above is only one standard method of wiring, you must perform tests prior to making the circuit live. It is possible that the circuit is configured differently and possible that more than one fitting is served by the switch. I can help you no more without test being carried out!
Your picture shows a loop in wiring method. The middle section with all the reds is your live loop, as per my previous post, they are all terminated together but not directly connected to the light. One red comes from a fitting/accessory upstream of this light fitting, one red goes to a fitting/accessory downstream of it and the third goes to the com of switch that operates this light.
The upper single black, should be the switch line and really should be indicated as so, with a red sleeve tape/mark. This cable comes from the switch where one of the reds goes to and is not a neutral, and is connected to the live side of the light.
The two other blacks are your looped in neutrals, one comes from a fitting/accessory upstream of this light and the second comes from one downstream of it.
The greens are CPCs/earths and are terminated together at the earth terminal of fitting.
If you get the blacks(neutrals and switch line) mixed up the circuit will blow.
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!