The experienced goalkeeper spent the second half of last season with the Pirates on loan from Millwall and has signed for John Ward's men after his Lions contract expired.
Chairman Nick Higgs told the club's official website: "We are delighted to have signed Steve as he really helped turn our season around last season.
"During his time with us he became a popular member of the squad, and worked hard to get us out of danger.
"I believe it is vitally important to have a permanent goalkeeper, rather than relying on loan signings, and I believe Steve will be part of a solid defence next season."
Mildenhall's two-year deal has the option of a third year triggered by appearances.