Gary Bradshaw got his first ever senior goal 8 minutes later. Alexander flicked on to the youngster, and his shot went through Pilkington to make it 2-0.
Mansfield pushed forward, but excellent defensive work by City stopped them getting through.
Their best opening came 10 minutes before half time when Chris Greenacre beat the offside trap, but he lobbed wide.
Loan signing David Norris came on for Richard Sneekes at the interval and got a debut goal after only four minutes.
Alexander made a great pass to Williams on the right, and he fired the ball in for Norris to knock it home from close range.
Things flared up with lots of nasty challenges coming in from petulant Mansfield players. Three of their players were booked in a 7 minute spell, while Mark Greaves was also shown a yellow card for reacting to a bad challenge on Lee Philpott. He had to go off minutes later due to an achilles injury, with David Beresford coming on.
The substitute set up City's fourth in the 78th minute, with Julian Johnsson beating Pilkington to his cross, bravely heading into the open net.
Sloppy defensive work saw Mansfield score a consolation goal three minutes later, with Bradley sneaking in at the back post to pull it back to 4-1.
But there was no doubt over who would take the points, and City can now go into Saturday's match against Scunthorpe with confidence.
Bar Mansfield, all of the top 9 picked up wins tonight so City stay 6th in the table.
Starting line-up (4-4-2): Musselwhite; Edwards, Whittle, Greaves, Wicks; Williams, Johnsson, Sneekes (Norris), Philpott (Beresford); Alexander, Bradshaw (Dudfield).
Un-used subs: Glennon, Holt.