Our findings suggest SGLT2 inhibitors may reduce certain types of infection. Here, SLC5A2 is linked to infection.