These results indicate that S. aureus induces synapse elimination and cognitive impairment by activating microglia and astrocytes through C3-C3aR signaling. This evidence concerns the gene C3AR1 and Cognitive impairment.