How can I paint over mold to prevent it from coming back again?
Don't try painting over mold.  Use bleach to get rid of it first.  Make sure the entire area is completely dry.  Then use a special anti mold paint.