Is there a way to connect LOCALHOST without using ComputerName in SQL Server?
MyComputerName\LOCALHOST
the named instance is namedLOCALHOST
on your computer. To connect to it, you must either provide an instance name (and use the SQL Server Browser service ), or explicitly specify a listening port (and the instance is configured to listen on a static port , not the default, since these are dynamic ports by default). So any of the below will work:
-
.\LOCALHOST
-
localhost\LOCALHOST
-
local\LOCALHOST
-
127.0.0.1\LOCALHOST
-
machinename\LOCALHOST
-
.:<port>
-
localhost:<port>
-
127.0.0.1:<port>
- etc.
It is highly unlikely that you really wanted to set up a named instance of LOCALHOST. You probably didn't read the configuration dialogs and misconfigured the instance name. My recommendation would be to install it again, choosing the default instance (i.e. No Name) or a more convenient and less confusing instance name.
source to share