England, who chose to bowl first in a bid to wrap up the three-match series after winning Friday's first game by 21 runs, made regular breakthroughs after Woakes struck twice in his opening spell.
Mahmudullah top-scored with 75 while skipper Mashrafe Mortaza provided some late impetus with 44 off 29 balls, helping his side cross the 200-run mark.
Bangladesh were in trouble once Woakes, who finished with 2-40, removed openers Imrul Kayes (11) and Tamim Iqbal (14) in his successive overs to leave the hosts on 26-2.
Rahim, who made 21, top-edged the paceman to fine leg where Moeen Ali took a superb catch. Bangladesh's woes worsened when star all-rounder Shakib Al Hasan departed for three after gloving a delivery from Ben Stokes down the leg side to wicketkeeper Jos Buttler.
Also Read
Mahmudullah and Mosaddek Hossain lifted their side from a precarious 113-5 with a 48-run sixth-wicket stand before leg-spinner Rashid struck.
Mortaza came to the rescue with his quick-fire 44 which included two fours and three sixes.
Nasir Hossain, brought in to replace left-arm spinner Mosharraf Hossain in Bangladesh's only change from the opening match, gave Mortaza good support with 27 not out. Ball claimed 2-44 while Rashid finished with 2-53.
The third and final ODI will be played in Chittagong on Wednesday.
Disclaimer: No Business Standard Journalist was involved in creation of this content