atan
V2EX  ›  问与答

XP下如何修改localhost解析为其他IP

  •  
  •   atan · Oct 29, 2012 · 5319 views
    This topic created in 5126 days ago, the information mentioned may be changed or developed.
    我修改了hosts似乎无效,怎么修改都是指向127.0.0.1,有什么方法可以改变localhost的IP地址吗?
    7 replies  •  1970-01-01 08:00:00 +08:00
    atan
    atan
    OP
    Oct 29, 2012
    1
    Win7下修改hosts就可以,XP死活不行~~
    sNullp
    sNullp
    Oct 29, 2012
    2
    我只是好奇一下为什么要这么做。。
    atan
    atan
    OP
    Oct 29, 2012
    3
    有个软件,远程连接MYSQL,地址写死了,只能连localhost
    clowwindy
    clowwindy
    Oct 29, 2012
    4
    ssh -L localhost:3306:localhost:3306 servername
    atan
    atan
    OP
    Oct 29, 2012
    5
    @clowwindy 谢谢,但是我不是要远程连接,我是连接数据库的信息写在php里的,而且只能写localhost, 但实际上数据库不再本地,而在局域网里的另一台服务器上。
    SAGAN
    SAGAN
    Oct 29, 2012
    6
    那你写个socket程序监听本地3306端口转发到别的机器吧 = =
    clowwindy
    clowwindy
    Oct 29, 2012
    7
    @atan ssh -L 透明端口转发
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4929 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 02:56 · PVG 10:56 · LAX 18:56 · JFK 21:56
    ♥ Do have faith in what you're doing.