2

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 192.xxx.xxx.xxx).

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,

turki

--UPDATE--

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

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

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

In mysql server (ubuntu guest), I change the bind-address to host 130.168.38.131 (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'@'130.168.38.131' IDENTIFIED by 'turki';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'130.168.38.131'
IDENTIFIED BY 'turki' WITH GRANT OPTION;

and I still can't connect from remote client!

please help

3
  • Have you tried to configure the network interface with NAT on the virtual machine? This should be worth a try.
    – cyphorious
    Mar 2, 2012 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, 2012 at 0:32
  • solved it, see the link ubuntuforums.org/showthread.php?t=1934500
    – turki
    Mar 5, 2012 at 0:17

1 Answer 1

1

http://www.vmware.com/support/ws55/doc/ws_net_configurations_nat.html

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.

Michal

You must log in to answer this question.

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