Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Windows server 2008 and SQL Server 2008 on VirtualBox, now I want to remotely connect to it via php.
I don't know what kind of network connection is needed, how to set it and...

share|improve this question
up vote 2 down vote accepted

First you need to set your guest OS networking as Bridge. In my case I use eth1, but proably your is eth0.

alt text

Now when you start windows, check that the ip is of the same local network of your host machine (launch cmd and next digit ipconfig). If the ip is right, try to ping your guest machine from Ubuntu host machine:

ping ip_guest

If all is ok, now you can access your guest machine (windows) from your host machine (Ubuntu).

I've recently migrated an application from mssql 2005 to MySql (precisely MariaDB) and I have developed a set of scripts in php to do this task.

For remotly connect to a sql server I'have installed through Synaptic the php5-sybase extension.

Next from my php scripts I have opened two connection, one with sql server and one with MySql and migrated the desired data.

$username_from="mssql_user"; //mine is sa

$server_to   = "";
$username_to = "mysql_user";
$password_to = "mysql_password";

//FROM Connect to MSSQL
$link_from = mssql_connect($server_from, $username_from, $password_from);
//TO Connect to MySQL
$link_to = mysql_connect($server_to, $username_to, $password_to);

Mssql function are analogue to the Mysql one: It change only the prefix...

share|improve this answer
By the way, you also have to enable the TCP listener service on port 1433 on the windows vm because its not enabled by default. also, you might want to enable the default "sa" account to use for development authentication. also, make sure windows firewall allows incoming 1433. – djangofan Nov 22 '10 at 21:12

You can use a bridget Network Interface from the Virtual Machine, so you can use this one like a real Server...

share|improve this answer

Bridged networking

This is for more advanced networking needs such as network simulations and running servers in a guest. When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system's network stack.

Read the complete article here:

Hope this helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.