A 6.5-magnitude earthquake rattled Mexico's capital and a tourist hotspot on the Pacific coast on Friday, killing at least two people and causing moderate damage in a small town near the epicenter.