Mick Harford secured his first home win as Rotherham boss in their Carling Cup opener against Port Vale.
His side went ahead four minutes before the break following a Steve Rowland own goal from a Jon Otsemobor cross.
But Michael Cummins headed home a pass from Craig James to level proceedings on the stroke of half-time.
Rotherham went 2-1 up when Deon Burton got his head to John Mullin's cross, then Otsemobor ensured the win with his goal in the dying seconds.
Rotherham: Cutler, Otsemobor, Barker, Murdock, Robertson, Mullin, McLaren, Williamson, Keane, Butler, Burton (Worrell 88).
Subs Not Used: Montgomery, Gilchrist, Hurst, Hoskins.
Goals: Rowland 41 og, Burton 71, Otsemobor 90.
Port Vale: Goodlad, Pilkington, Bell (Birchall 1), Abbey (Rowland 20), Collins, Dinning (Sam 77), Sonner, Cummins, James, Lowndes, Paynter.
Subs Not Used: Brain, Matthews.
Goals: Cummins 45.
Ref: C Oliver (Northumberland).