The difference between localhost and 127.0.0.1 is that a few days ago, I installed a mysql software from ecshop under the mac and connected to the database. However, installing ecshop reminded me that the database could not be connected. The username and password were all right, so I focused on localhost and changed localhost to 127.0.0.1. As a result, I accidentally connected. I used to think localhost was the same as 127.0.0.1. There was no difference.
I got an article from the Internet and studied it with everyone
I believe some people will say that it is local ip. Someone once said that using 127.0.0.1 is better than localhost and can reduce one parsing.
It seems that some people are still unclear about this entry issue. In fact, there are differences between the two.
localhost is also called local. The correct interpretation is: local server 127.0.0.1 The correct interpretation on windows and other systems is: local address (local server)
localhot(local) is transmitted without a network card! This is important because it is not subject to restrictions related to network firewalls and network cards. 127.0.0.1 It is transmitted through a network card,
Relying on network cards and subject to restrictions related to network firewalls and network cards. Generally, localhost is the best when setting up programs for local services, but localhost will not solve the problem.
Separating into IP will not occupy network cards and network resources. This is the case where it is sometimes possible to use localhost, but not with 127.0.0.1. conjecture
When accessing localhost, the system uses the permissions of the current user of the machine to access it. When using ip, it means that the machine accesses the machine through the network, which may involve
and rights to network users.