
Benjamin Pavard’s fine volley in the 36th minute cancelled out Mainz’s lead through a Jean-Paul Boetius header and launched Bayern’s sustained attack.
A sensational David Alaba free kick on the stroke of halftime turned the game around before Ivan Perisic gave Bayern a two-goal cushion with a header at the far post in the 54th.
Kingsley Coman stabbed in their fourth 10 minutes later and league top scorer Robert Lewandowski also got onto the scoresheet, firing in his sixth goal in three league matches in the 78th.
Substitute Alphonso Davies completed the rout two minutes later.
RB Leipzig are top on nine points after their 3-1 win at Borussia Moenchengladbach on Friday.