The former Manchester City defender -¬†who moved to Anderlecht as player-manager during the summer - won four Premier League titles with the Citizens but missed out on the match in his honour after picking up an unfortunate hamstring injury in the build-up to Wednesdays showpiece.
Taking up a place in the dugout instead,¬†‚ÄčKompany¬†will have been delighted with what he saw as¬†‚ÄčCity¬†took the lead when¬†Gary Neville was caught horribly out of position, leaving space for Martin Petrov to slam home after less than a minute.
With changes for both sides taking place throughout the match, there failed to be any sustained rhythm to the game, but another goal did come before half-time as Robin van Persie made up for an earlier miss with a fine assist for Robbie Keane to put the visitors in front.
Van Persie and the Irishman played a neat one-two, with the former¬†‚ÄčManchester United¬†striker feeding Keane to tap home with half an hour played.
Just as the first half started well for Kompany, the second half started disastrously as Van Persie connected beautifully with Tim Cahills back-heel to curl home from outside the box just two minutes after the restart.
The All-Stars controlled the game from thereon in, with Michael Carrick and Jamie Carragher in keeping hold of the ball well alongside Manchester United legend Paul Scholes.¬†
Petrov came closest to drawing level for City with a few long drives, but the equaliser finally came as substitute Benjani connected with¬†a free kick delivery to guide a header home beyond Shay Given with a minute left to play.
All of the proceeds raised from Kompanys testimonial¬†will go towards Tackle4MCR, a charity Kompany set up with Greater Manchester Mayor Andy Burnham to help with homelessness in the city.