Measurements are reported of the WZ and ZZ production cross sections in proton-proton collisions at s=8 TeV in final states where one Z boson decays to b-tagged jets. The other gauge boson, either W or Z, is detected through its leptonic decay (either W→eν , μν or Z→e+e- , μ+μ- , or νν¯ ). The results are based on data corresponding to an integrated luminosity of 18.9 fb -1 collected with the CMS detector at the Large Hadron Collider. The measured cross sections, σ(pp→WZ)=30.7±9.3(stat.)±7.1(syst.)±4.1(th.)±1.0(lum.)pb and σ(pp→ZZ)=6.5±1.7(stat.)±1.0(syst.)±0.9(th.)±0.2(lum.)pb , are consistent with next-to-leading order quantum chromodynamics calculations.