The best way to get rid of the musty smell in your bathroom is to treat the mold. Use baking soda, vinegar, bleach, ammonia, or hydrogen peroxide to kill the spores, which will rid you of that musty smell.
However, never mix ammonia and bleach because that creates a dangerous chemical reaction to produce fumes that can quickly overpower you.