Fill your sink with hot water and a squeeze of liquid dishwashing soap.
Remove the top rack from the dishwasher. Clean it in the sink using a scrub brush. Dry it with a towel. Repeat this step for the bottom rack.
Combine one part bleach with three parts water in a small bucket or large bowl. Dip a toothbrush in this solution, and scrub around the seal of the dishwasher on the inside of the door with the toothbrush to remove any mildew and food particles stuck in the seal.
Use the toothbrush and the diluted bleach solution to clean around the outside corners, as well as the bottom of the dishwasher door. Water may sometimes escape from this area, especially if you occasionally open your dishwasher in the middle of a cycle to add a dish to it. After awhile, the water may attract mildew.
Use a toothpick to poke through the holes located on the dishwasher's spinning arm. The spinning arm sits at the bottom (and sometimes the top) of the dishwasher. When the cycle begins, the arms spin and shoot water around. If food particles get stuck in the holes of these spinning arms, mildew may ensue. By poking the holes with the toothpicks, you're clearing them, and thus removing particles that may attract mildew.
Return the racks to the dishwasher. Add a bowl full of white vinegar to the top rack. Run a full dishwashing cycle to deodorize the dishwasher. Your dishwasher should now be sanitized and mildew-free.