Hydrolysis of terminal non-reducing beta-D-galactose residues in beta-D-galactosides. Binds 2 magnesium ions per monomer. Binds 1 sodium ion per monomer. Homotetramer. Belongs to the glycosyl hydrolase 2 family.