The home side reached 149-5 by tea on the first day, recovering from 70-4 on a turning pitch at the P. Sara Oval, owing mainly to Chandimal's 54 not out at the interval.
Chandimal shared a 66-run stand with Dhananjaya de Silva to halt what had become a quick procession of wickets in a slow-scoring innings.
Chandimal was given out lbw on 38 off the bowling of left-arm spinner Shakib Al Hasan but the decision was overturned after the batsman asked for a review.
He then top-edged another left-arm spinner Taijul Islam to fine leg on 46 but was given a benefit of doubt by the third umpire as TV replays regarding whether Mehedi Hasan had caught him cleanly were inconclusive.
Coming into the side for Lahiru Kumara as Sri Lanka's only change from their 259-run win in the first Test in Galle, de Silva gave Chandimal good support before he was bowled by Taijul for 34.
Bangladesh, sent into bowl first by Sri Lankan captain Rangana Herath, had taken the honours in the opening session as off-spinner Mehedi struck twice and fast bowlers Mustafizur Rahman and Subashis Roy took one wicket apiece.
Mustafizur put the visitors in good heart in their milestone Test when he forced an edge from opener Dimuth Karunaratne, having cranked up the pressure by bowling three successive maidens.
Mehedi took a brilliant catch at gully as Karunaratne departed after making just seven runs.
Mehedi then struck in his third over, enticing Kusal Mendis out of his crease before Mushfiqur Rahim completed the stumping.
Mendis was the man-of-the-match in the first Test in Galle after scoring 194 but he departed this time having scored just five.
Sri Lanka's troubles deepened when Upul Tharanga edged Mehedi to Soumya Sarkar at slip for 15 after earlier being given a reprieve by a television replay when he was given out lbw off Mustafizur for six.
Chandimal and Asela Gunaratne tried to revive the innings but Subashis struck on the stroke of lunchtime when he trapped Gunaratne lbw for 13.
Bangladesh, in their quest to draw level in the second match of the two-Test series, made four changes to the squad.
Wicketkeeper-batsman Liton Das was ruled out on the eve of the match with a rib fracture, allowing Mosaddek Hossain to earn his debut.
Mominul Haque, Mahmudullah and Taskin Ahmed made way for Imrul Kayes, Sabbir Rahman and Taijul.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)