Greenish mucus with blood and diarrhea
too is most likely due to an intestinal infection.
Since he had cold too, looks like viral.
But if he has fever
, reduced appetite, abdominal pain
etc its better to meet your doctor at the earliest as bacterial and parasitic causes of dysentery
will have to be treated accordingly.
Hope my answer is helpful.