The Glovers will travel to Vale Park the weekend of December 1st.
Darren Way’s side defeated Sky Bet League One outfit Southend United in the first round – the 23rd time the club have overcome higher league opposition in the competition.
Fellow League Two team Vale also won against third tier opponents in Oxford United to reach this stage.
The draw was made by Andrew Cole and Kevin Davies live on BBC 2 and BT Sport.
Ticket information and prices will be released in due course.
SECOND ROUND DRAW IN FULL
Woking or Bury v Tranmere Rovers or Peterborough United
MK Dons v Maidstone United
Newport County v Cambridge United
Wycombe Wanderers v Leatherhead or Billericay Town
Port Vale v Yeovil Town
Shrewsbury Town v Morecambe
Doncaster Rovers v Northampton Town or Scunthorpe United
Slough Town v Rochdale
AFC Wimbledon v Charlton Athletic
Stevenage v Swindon Town
Mansfield Town v Guiseley or Accrington Stanley
Gateshead v Luton Town
Bradford City v Plymouth Argyle
Blackburn Rovers v Crewe Alexandra
AFC Fylde v Wigan Atheltic
Gillingham v Carlisle United
Notts County v Oxford City
Forest Green Rovers v Exeter City
Chorley or Fleetwood Town v Hereford
Coventry City v Boreham Wood