Blot the excess mayonnaise from the carpet. Use paper or terry-cloth towels to soak up as much of the greasy substance as possible.
Pull out more mayonnaise with a butter knife. Use the flat side of the knife to push up the substance to the surface of the carpet. Blot up the extra mayonnaise you've removed. If the spot is hardened or dry, the knife can help break up the spot.
Mix 1/4 teaspoon of liquid dish soap with a quart of water in a spray bottle. Mix well and spray the spot until it's soaked with the solution.
Rub the spot with a towel to agitate the soap-and-water mixture into the greasy stain.
Spray the area with clear water to rinse. Blot dry.