Mix 1 cup of bleach with 1 gallon of water. Brush or spray mildew with the solution, preferably when the tent is up. Brush well to remove mildew. Leave for a short while and then rinse thoroughly with water. Dry completely before folding and storing.
You can get a specialist ten cleaning product from camping stores to kill and clean off mildew without damaging the fabris or leaving a very nasty smell - can't remember what it is called though.