Closer Kirby Yates came on with the bases loaded in the ninth to strike out pinch-hitter Austin Slater for his 11th save of the season.
The 27-year-old Mitchell allowed seven hits and three walks while producing a season-high seven strikeouts. Mitchell (2-4) finished with career-high totals of 8 1/3 innings and 118 pitches. He had never gone deeper than seven innings and had never thrown 100 pitches in a game.
The Giants loaded the bases in the ninth on a leadoff double by Brandon Crawford and two walks.
No Padres pitcher has thrown a complete-game shutout this season.
The Padres improved to 63-94, meaning they will not lose 100 games this year. They last had a triple-digit-defeat season in 1993.
The Padres took a 1-0 lead in the second when rookie catcher Francisco Mejia hit a one-out double and came around on singles by Pirela and Manual Margot. Myers doubled leading off the third and scored on Reyes' opposite-field single to right. Pirela homered leading off the fourth.