Owain Rowlands scored the opening try of the match in the 30th minutes as the home side led 10-0 at the interval. But, even down to 14 men after a yellow card for Dan McShane for killing the ball, Cardiff bounced back to win.
Cardiff Coach Justin Burnell said: "A year ago we'd have lost that game if we had been in that situation after 60 minutes. But the team showed terrific spirit and never gave up."
Leaders Neath maintained their 100% winning start to the season with a last gasp 23-16 win at Maesteg. With the scores level, Gareth James powered over with just seconds left for the reigning champions.
Newport gained a bonus-point with four tries in a 26-22 victory at Swansea. Centre Scott Williams was the match winner with a try on 70 minutes to add to the visitors scores by Richard Fussell, Will Kershaw-Taylor and a penalty try.
Ebbw Vale beat Aberavon 22-17 who had Darren Ryan sent off for stamping while the surprise of the afternoon saw Cross Keys defeat Pontypridd 22-6.Three tries by Gareth Chapman, Marcus Johnstone and Lloyd Burns earned the win.
A brace of tries by Dan Godfrey led Llanelli to a 34-13 home win against winless Bridgend and a double by lock Gareth Knight saw Glamorgan Wanderers win 25-19 away to Bedwas. The home side scored the try of a scrappy match in the second half thanks to Nathan Hill's solo effort but it wasn't enough.
Principality Premier Division
Aberavon 17, Ebbw Vale 22
Bedwas 19, Glamorgan Wdrs 25
Llandovery 10, Cardiff 26
Llanelli 34, Bridgend 13
Maesteg 16, Neath 23
Pontypridd 6, Cross Keys 22
Swansea 22, Newport 26