
数据库连接问题 127.0.0.1和localhost有什么区别?
在我得.net2003里,字符串是localhost就联不上SQLSERVER,而127.0.0.1或者"."就可以连上,为什么?这么解决?我得host文件内容是:127...
在我得.net2003里,字符串是localhost就联不上SQLSERVER,而127.0.0.1或者"."就可以连上,为什么?这么解决?
我得host 文件内容是:127.0.0.1 localhost
没有问题!
日,现在又没问题啦,哪种都可以连上。
就没人能解释以下吗???????????????
此问题无满意答案,没有人能解释得清楚。。。。。。。
但要多谢各位得回答,分数就不浪费啦。。。。。。。。 展开
我得host 文件内容是:127.0.0.1 localhost
没有问题!
日,现在又没问题啦,哪种都可以连上。
就没人能解释以下吗???????????????
此问题无满意答案,没有人能解释得清楚。。。。。。。
但要多谢各位得回答,分数就不浪费啦。。。。。。。。 展开
15个回答
展开全部
你 hosts 文件没有定义
[C:\WINDOWS\system32\drivers\etc]type hosts
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
[C:\WINDOWS\system32\drivers\etc]
[C:\WINDOWS\system32\drivers\etc]type hosts
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
[C:\WINDOWS\system32\drivers\etc]
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
应该都可以联上的,它两之间不同在于,把网线断开后,127.0.0.1就不好用了而
localhost就可以.
localhost就可以.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
没太多区别,,反正都是同样的用处就对了。。OK
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
本人力挺 布鱼 的回答 (local) ,localhost, 127.0.01, 或者你网卡上的IP
或者 SQL server的别名 都对的
我的全部通行无阻
或者 SQL server的别名 都对的
我的全部通行无阻
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
.
(local)
localhost
3种总有一个是对的
127.0.0.1肯定对
(local)
localhost
3种总有一个是对的
127.0.0.1肯定对
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询