In TCP/IP networking, Loopback Address is the special IP address 127.0.0.1. The loopback address is used to route outgoing IP packets to the TCP/IP protocol stack bound to the network interface card (NIC) and back to the source application without actually placing the packets on the network.

To test whether TCP/IP is installed correctly on a machine running Microsoft Windows, type ping 127.0.0.1 at the command prompt. You can also type the command ping localhost to achieve the same result, or you can even ping any other legal IP address with the form 127.x.y.z. If this test produces an error, your NIC is incorrectly configured or your TCP/IP stack is corrupt. Try removing and reinstalling TCP/IP on your machine. If that fails, try reinstalling the driver for your NIC or replacing the NIC.
The local loopback mechanism may be used to run a network service on a host without requiring a physical network interface, or without making the service accessible from the networks the computer may be connected to. For example, a locally installed website may be accessed from a Web browser by the URL http://localhost to display its home page.
Localhost in MySQL databases
The releases of the MySQL database differentiate between the use of the hostname localhost and the use of the addresses 127.0.0.1 and ::1. When using localhost as the destination in a client connector interface of an application, the MySQL application programming interface connects to the database using a Unix domain socket, while a TCP connection via the loopback interface requires the direct use of the explicit address.