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?
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
Re: Connecting to a remote daabase
Search a bit more,
Quote:
Originally Posted by
Dude3889
$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:
Port is the default mssql port.
Quote:
Originally Posted by
Dude3889
Quote:
Originally Posted by
rahulbisme
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.
Quote:
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
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.
Quote:
Originally Posted by
mutter
Re: Connecting to a remote daabase
So IP\SQLEXPRESS:PORT
Correct?
@I transferred to Windows hosting, so I have full mssql support.
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)
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.