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

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)