Paint will only temporarily hide the mold and the mold will "eat" the paint and grow back through.  It does nothing to eliminate it and its roots.