Two goals from Stuart Barlow guided Stockport into the second round and clinched caretaker-manager John Hollins' second successive win- but it may well have been his last game in charge.
For as Barlow rifled in the 85th minute winner from Aaron Wilbraham's knock-down, club officials were denying strong rumours that Northern Ireland manager Sammy McIlroy had quit his post to join County.
On the field, 18-year-old keeper James Spencer was Stockport's hero with two spectacular second-half saves to prevent Colin Larkin putting the Stags ahead.
However, the keeper was lucky in the 62nd minute when he appeared to carry Wayne Corden's dipping drive over his own line with the referee unsighted.
The Stags had been pinned in their own half in the opening stages as Stockport squandered a hatful of chances through Kevin Ellison, Robert Jones and Barlow.
In the 11th minute, Barlow made no mistake with a breathtaking goal, rounding the keeper and lobbing into the roof of the net from 20 yards.
Brave Mansfield replied with a period of sustained pressure of their own.
Larkin's close-range finish was tipped over the bar and then the home side struck the woodwork twice in as many minutes, Jamie Clarke striking the post before Corden crashed a 25 yard blockbuster against the bar.
Rhys Day did put the Stags level shortly before the hour, but Barlow's second proved decisive.