Connecting to a remote daabase

Results 1 to 6 of 6
  1. #1
    Member rahulbisme is offline
    MemberRank
    Jun 2008 Join Date
    Stamford, CTLocation
    90Posts

    Connecting to a remote daabase

    Hey ragezone!

    I just bought a second VPS to host my GunZ website. I enabled remote connections on my VPS and I used the host name
    Code:
    '64.244.60.17\SQLEXPRESS'
    For some odd reason, it still won't connect to the database?

    Running:

    IIS (Plesk)
    MSSQL 2008 RC2
    Windows Server 2003 (For db)
    Windows Server 2008 (for site)

    Does anyone have an idea of what the problem could be?


  2. #2
    Ecchi addicted adz28 is offline
    MemberRank
    Nov 2008 Join Date
    IkebukuroLocation
    524Posts

    Re: Connecting to a remote daabase

    Don't connect or page give you errors... i have the same problem last day, be sure your webhost allows MSSQL

  3. #3
    Banned Blasian is offline
    BannedRank
    Aug 2009 Join Date
    California, USLocation
    773Posts

    Re: Connecting to a remote daabase

    Search a bit more,
    Quote Originally Posted by Dude3889 View Post
    $host = 'blah';
    PHP Code:
    $user 'username';
    $pass 'password';
    $db 'GunzDB';

    mssql_connect$host$user$pass) or die ('Could Not Connect to Mssql Server');
    mssql_select_db $db) or die ( 'Can not select database' ); 
    where host is:
    Code:
    server_name:port
    Port is the default mssql port.
    Quote Originally Posted by Dude3889 View Post
    Quote Originally Posted by rahulbisme View Post
    And this will work on linux even though I don't have MSSQL support?
    well if the MSSQL is hosted on a windows or w/e. But there this wine do.

    sudo apt-get wine

    sudo apt-get winetricks
    then run winetricks and see if mssql is supported, I don't know what
    version of linux your using, but even if you did Linux os can't run
    gunz servers at least i never tried.

    Dont for get to like if i helped u =,=
    Quote Originally Posted by DawsonByrd View Post
    You just want to host your WEBSITE on a linux box right? IF it's just the website just make sure apache/litespeed/whatever webserver is running on the linux box has the MSSQL support added (if it doesn't contact your host and ask for it! It's free for them anyway)

    Then it's as simple as doing the remote connection as said above.

  4. #4
    Member rahulbisme is offline
    MemberRank
    Jun 2008 Join Date
    Stamford, CTLocation
    90Posts

    Re: Connecting to a remote daabase

    So IP\SQLEXPRESS:PORT

    Correct?

    @I transferred to Windows hosting, so I have full mssql support.

  5. #5
    Ecchi addicted adz28 is offline
    MemberRank
    Nov 2008 Join Date
    IkebukuroLocation
    524Posts

    Re: Connecting to a remote daabase

    Yepe, also you can use the original code, nothing change.
    PS: Port is 3776 (if you use XZeenon tutorial)

  6. #6
    Member rahulbisme is offline
    MemberRank
    Jun 2008 Join Date
    Stamford, CTLocation
    90Posts

    Re: Connecting to a remote daabase

    I fixed it. For anyone who had the same problem, make sure to allow whatever TCP port you are using through Windows Firewall.



Advertisement