We show that for any compact connected group G the second cohomology group defined by unitary invariant two-cocycles on (G) over cap is canonically isomorphic to H-2(<(Z(G))over cap>;T). This implies that the group of autoequivalences of the C*-tensor category RepG is isomorphic to H-2(<(Z(G))over cap>;T) x Out(G). We also show that a compact connected group G is completely determined by RepG. More generally, extending a result of Etingof-Gelaki and Izumi-Kosaki we describe all pairs of compact separable monoidally equivalent groups. The proofs rely on the theory of ergodic actions of compact groups developed by Landstad and Wassermann and on its algebraic counterpart developed by Etingof and Gelaki for the classification of triangular semisimple Hopf algebras. We give a self-contained account of amenability of tensor categories, fusion rings and discrete quantum groups, and prove an analog of Radford's theorem on minimal Hopf subalgebras of quasitriangular Hopf algebras for compact quantum groups.