Today, the colleagues out of the demo feedback A question, said is not plugged in the network, access to the local database.
Take this question and clear the
(1) 127.0.0.1,
(2).
(3) Native IP
(4) localhost
The difference between.
No1:
localhost is also known as local, and the correct explanation is: the native server
The correct explanation of 127.0.0.1 in Windows and other systems is: Native address (native server)
their resolution through the native host file, Windows automatically resolves localhost to 127.0.0.1
NO2:
localhot (local) is not transmitted through the network card! This is important, and it is not limited by network firewalls and Nic-related.
The 127.0.0.1 is transmitted through the network card, relies on the network card, and is restricted by the net firewall and the NIC.
The local IP is also transmitted through the network card, relying on the network card, and is subject to the Internet firewall and Nic-related restrictions.
However, the difference between native IP and 127.0.0.1 is:
127.0.0.1 can only be accessed via the native computer
Native IP can also be accessed externally through native access
The General Setup program when the local service with localhost is the best, localhost will not be resolved to IP, and will not occupy the network card, networking resources.
Sometimes it can be used with localhost, but it is in this case that it is not possible to use 127.0.0.1. Guess when the localhost access, the system with the current user's permissions to access, and IP, equal to the machine is to access the computer through the network, with the user's rights to the network.
Problems that cannot access the native database after you disable network connections