Galvanized pipe is showing signs of corrosion due to electrolysis. How can this be prevented?

Galvanized pipe is showing signs of corrosion due to electrolysis. How can this be prevented?