Pull the piano away from the wall so that you can get behind and around it on all sides. Remove the lid and harp covers, or prop them open, depending on what type of piano you have.
Look for signs of mold and mildew inside the piano's cabinet. Check the backs of the hammers for white or black mold on the felts. Sometimes you will be able to smell the mildew before you see it.
Vacuum the inside of the piano with a soft brush attachment to remove dust, dirt and spores. Clear dust and cobwebs from the back of the piano, the sides, legs and bottom.
Wipe down all surfaces inside the piano cabinet, including the strings, with a soft cloth dampened with rubbing alcohol. The alcohol will kill bacteria and spores, and evaporate quickly without damaging finish.
Go back over the same areas with another cloth, dampened with a 50 percent solution of vinegar and warm water. This will change the pH of the environment inside the piano, making it inhospitable to mildew.
Wipe the wood finish of the piano's outside with another clean cloth dampened with lemon oil. This will remove dirt and mildew, moisturize the wood, and leave a fresh scent in place of the musty odor.
Install a dehumidifier in your home if you do not have central air conditioning. Not only will this remove moisture from the atmosphere that causes mold and musty odors, but it will help your piano strings stay in tune longer.