Human milk oligosaccharides, such as 2′-fucosyllactose (2′-FL), and galacto-oligosaccharides (GOS), a prebiotic carbohydrate mixture, are being increasingly added to infant formulas, necessitating the understanding of their impact on the oral microbiota. Here, for the first time, the effects of 2′-FL and GOS on the planktonic growth and adhesion characteristics of the caries-associated oral pathogen Streptococcus mutans were assessed, and the results were compared against the effects of xylitol, lactose and glucose. There were differences in S. mutans growth between 2′-FL and GOS. None of the three S. mutans strains grew with 2′-FL, while they all grew with GOS as well as lactose and glucose. Xylitol inhibited S. mutans growth. The adhesion of S. mutans CI 2366 to saliva-coated hydroxyapatite was reduced by 2′-FL and GOS. Exopolysaccharide-mediated adhesion of S. mutans DSM 20523 to a glass surface was decreased with 2′-FL, GOS and lactose, and the adhesion of strain CI 2366 strain was reduced only by GOS. Unlike GOS, 2′-FL did not support the growth of any S. mutans strain. Neither 2′-FL nor GOS enhanced the adhesive properties of the S. mutans strains, but they inhibited some of the tested strains. Thus, the cariogenic tendency may vary between infant formulas containing different types of oligosaccharides.