The sixth-seeded Mayer saved seven break points in the first set to force a tiebreaker, then broke for a 3-1 lead in the second.
Mayer made his return from a hip injury that forced him to withdraw from the Australian Open.
Mayer enjoyed his best season last year, breaking into the top 20 for the first time and beating Rafael Nadal in straight sets at the Shanghai Masters.
Rufin defeated Vasek Pospisil of Canada 6-4, 7-6 (6). The 209th-ranked Rufin won his first match in the main draw of an ATP tour event since last year's French Open.
Davydenko downed Stephane Robert of France 6-2, 6-1 to win his first match this season after first-round losses at the Qatar Open and in Melbourne, Australia.
The former top 10 player won more than half of his return points to break Robert five times. He will face fourth-seeded Richard Gasquet in the next round.