Crystal structure of the ligand-binding protein EhuB from Sinorhizobium meliloti reveals substrate recognition of the compatible solutes ectoine and hydroxyectoine.