Super User is a question and answer site for computer enthusiasts and power users. 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 am using VMware (v 1.3) and I have Windows 7 as a host (with public IP) and Ubuntu (10.10) as a guest OS (with private IP that is assigned by VMware

In Ubuntu, I have a mysql server that I can access it from the localhost (ubuntu) with no problems. Now, I have a separate (remote) machine that I want to connect to the mysql server on the Ubuntu VMware.

the command I am using from the remote machine:

mysql -u UserName –h WindowsIP –p

But I can't connect:

ERROR 2003 (HY000): Can't connect to MySQL server on WindowsIP

The windows firewall is off.

I can ping, access the remote machine from the Ubuntu box itself, but I can't do it the way around. Basically I can ssh or mysql:

Ubuntu (Vmware)---->remote machine (Ubuntu)

but I can't:

remote machine -->windows7---->Ubuntu (VMware)--->Mysql

and this is what I am trying to achieve here.

I appreciate any help,



  • Windows IP address
  • Vmware network: NAT
  • VMware Network Adapter
  • VMnet8:

When I try to connect from remote client to windows host, following is the error:

mysql -h -p
Enter password: ****
ERROR 2003 (HY000): Can't connect to MySQL server on '' (111) server

In mysql server (ubuntu guest), I change the bind-address to host (host ip) in /etc/mysql/my.cnf. However, I noticed that mysql is refusing to restart/start when I use any value in bind-address.

also, I created the remote user in the mysql:

create user 'root'@'' IDENTIFIED by 'turki';

and I still can't connect from remote client!

please help

share|improve this question
Have you tried to configure the network interface with NAT on the virtual machine? This should be worth a try. – cyphorious Mar 2 '12 at 13:51
yes, I am using the NAT feature in the VMware player. still no luck in connecting to mysql on ubuntu VMware player (inside windows 7) – turki Mar 3 '12 at 0:32
solved it, see the link – turki Mar 5 '12 at 0:17

If you select NAT, the virtual machine can use many standard TCP/IP protocols to connect to other machines on the external network. For example, you can use HTTP to browse Web sites, FTP to transfer files and Telnet to log on to other computers. In the default configuration, computers on the external network cannot initiate connections to the virtual machine.

That means, for example, that the default configuration DOES NOT let you use the virtual machine as a Web server to send Web pages to computers on the external network.


share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .