The green material is probably an iron(II) salt, corroded from what I assume is the steel composing the positive pole of the battery. If it has a gelatinous appearance, and slowly turned orange-ish over time, my guess would be it's $\ce{Fe(OH)2}$, with any orange color deriving from slow oxidation to various iron(III) species such as the oxide-hydroxides.
Per the above link, the white flakes are possibly that same iron(II) hydroxide, prior to reaction with $\ce{O2}$ to form the green color. Alternatively, it could be $\ce{Mg(OH)2}$, or a related magnesium compound, formed at the cathode (negative terminal) from the hydroxide ion produced by reductive water electrolysis:
$$
2\ce{H2O} + 2e^- \longrightarrow \ce{H2} + 2\ce{OH-}
$$
A photograph would be tremendously helpful in facilitating identification.