High LYZ expression in GED goats reduced the severity of mastitis and alleviated BMB damage. Here, LYZ is linked to mastitis.