Mediates the transport of melibiose and other galactosides by a symport mechanism (PubMed:21148559, PubMed:24389923, PubMed:29054867, PubMed:34110360). Can use sodium, lithium and protons as coupling cations, with a preference for sodium and lithium (PubMed:21148559, PubMed:24389923, PubMed:29054867). The use of Na(+) as coupling ion for sugar transport is based not on ion selectivity but on competitive binding under physiological conditions, because of a much higher Na(+) concentration under physiological conditions (PubMed:29054867). melibiose(in) + Na(+)(in) = melibiose(out) + Na(+)(out) Li(+)(in) + melibiose(in) = Li(+)(out) + melibiose(out) H(+)(in) + melibiose(in) = H(+)(out) + melibiose(out) Binding of Na(+) and melibiose is cooperative, the binding affinity for one substrate is increased by the presence of the other (PubMed:29054867, PubMed:34110360). With binding of one substrate (either Na(+) or melibiose), MelB favors open conformations (likely outward facing), whereas the cooperative binding of both substrates induces cavity closure. Thus, cooperative binding is the key that regulates the alternating-access process and ensures the obligatory cotransport as the core mechanism for symport (PubMed:34110360). Melibiose uptake is inhibited by valinomycin (PubMed:21148559). Apoprotein is apparently conformationally labile and readily converts to different states, including inward-facing conformations for substrate access (PubMed:34110360). Contains a conserved cation-binding pocket, which directly connects to the sugar specificity pocket (PubMed:34341464). Belongs to the sodium:galactoside symporter (TC 2.A.2) family.