Streptococcus agalactiae is a Gram-positive pathogen that can survive inside professional phagocytes and nonphagocytic cells to cause septicemia and meningoencephalitis in freshwater and marine fish. However, vaccines based on extracellular products (ECP) and formalin-killed whole S. agalactiae cells, as well as subunit vaccine are unable to protect fish from infection by variant serotypes S. agalactiae. The search for live attenuated vaccine with highly conserved and virulent-related genes is essential for producing a vaccine to help understand and control streptococcosis In this study, the phoB gene was cloned from pathogenic S. agalactiae TOS01 strain and the mutant strain SAΔphoB was constructed via allelic exchange mutagenesis. The results showed that the deduced amino acid of S. agalactiae TOS01 shares high similarities with other Streptococcus spp. and has high conserved response regulator receiver domain (REC) and DNA-binding effector domain of two-component system response regulators (Trans_reg_C). Cell adherence and invasion assays, challenge experiments and histopathological changes post-vaccination were performed and observed, the results showed that the mutant strain SAΔphoB has a lower adherence and invasion rate and less virulent than the wild type strain in golden pompano, and it doesn’t induce clinical symptoms and obvious pathological changes in golden pompano, thereby indicating that the deletion of phoB affects the virulence and infectious capacity of S. agalactiae. Golden pompano vaccinated via intraperitoneal injection SAΔphoB had the relative percent survival value of 93.1% after challenge with TOS01, demonstrating its high potential as an effective attenuated live vaccine candidate. Real-time PCR assays showed that the SAΔphoB was able to enhance the expression of immune-related genes, including MHC-I, MyD88, IL-22 and IL-10 after vaccination, indicating that the SAΔphoB is able to induce humoral and cell-mediated immune response in golden pompano over a long period of time.