Alkalization is responsible for antibacterial effects of corroding magnesium.