Ummm...windows, at least, treats "localhost" and "127.0.0.1" the same.
But MySQL on Windows may not use sockets. It can use named pipies, which are significantly faster.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.