Is there a difference between (local), '.' and localhost?

亡梦爱人 提交于 2019-12-01 02:06:19

The final result is the same. The difference is:

  • 'localhost' resolves at the TCP/IP level and is equivalent to the IP address 127.0.0.1
  • Depending on the application "(local)" could be just an alias for 'localhost'. In SQLServer, '(local)' and '.' mean that the connection will be made using the named pipes (shared memory) protocol within the same machine (doesn't need to go through the TCP/IP stack).

That's the theory. In practice, I don't think there is substantial difference in performance or features if you use either one of them.

They are generally synonyms. However, it depends on the application you are configuring. As long as the app understands what you mean, it shouldn't result in a performance loss. At least, not one you have to root out prematurely, if you get my drift.

As far as I know the dot "." and "local" are windows application terms, not a "standard" term, localhost resolves to 127.0.0.1 in the TCP/IP level so if you want to make sure you are "compatible" across platforms you should use either localhost or 127.0.0.1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!