The hosts were 15 minutes away from claiming victory, at the 15th attempt, only to denied by Okazaki's intervention.
Gertjan Verbeek's men made a bright start and moved ahead after just five minutes thanks to centre-back Per Nilsson's second goal of the season.
The Nuremberg supporters must have thought their side's winless run was set to end, but Okazaki had other ideas, latching on to a hopeful long ball and finishing calmly.
Mainz's goalscorer was withdrawn after his 75th-minute goal, but his replacement, Petar Sliskovic, failed to see out the game after receiving a straight red card in injury time.
Nuremberg remain 17th in the Bundesliga, while Mainz occupy seventh position.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.