Remove the strainer on the shower, run some water in the shower stall, Now go a flush the toilet in the smae bathroom. Go look at the shower drain does the water syphon out of the trap when the toilet is flushed. If that is the case then there should be a 1 1/2" vent before the shower P-Trap. to prevent syphonic action.
I see no one tried to answer this qustion.
If the shower is on the main floor perhaps you can run some water in the shower drain and go look in the basement underneath the shower to see if the drain is leaking causing the mildew smell. If the shower is in the basement or a slab on grade home. Run some water see if there are any leaks around the shower cabinet or around the drain area. Could be a broken or leaking shower drain, with water going underneath. That is all I can think of.