The cities of Mary Esther and Paxton have received nearly $4.5 million in state grants to improve water infrastructure.