ODBC connection to mysql on vbox vm

Discussions about using Linux guests in VirtualBox.
Post Reply
virgil_machine
Posts: 70
Joined: 25. Mar 2009, 19:42
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7, XP Home and Pro, Ubuntu 10.04, 11.04
Location: Cape Cod, MA, USA

ODBC connection to mysql on vbox vm

Post by virgil_machine »

I have been unable to set up an ODBC connection to a mysql database running on a virtual machine under vbox.

Version of vbox doesn't seem to matter--in both cases I am currently on 4.0.6, but the problem has persisted since 3.2.

Case 1: windows xp vm cannot connect to mysql on physical machines (ubuntu lucid), but not on a vm on a different vbox host--using ip address for the server (but CAN connnect to lucid physical machines).

Case 2: ubuntu natty vm cannot connect to mysql on a a lucid vm, also using ip for the server, both vms on the same vbox host.

For case 2 I followed these instructions: http://www.howtoforge.com/adding-an-odb ... -on-ubuntu

Is it possible to connect to mysql on a vm? If so, what am I missing?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: ODBC connection to mysql on vbox vm

Post by vbox4me2 »

Added the odbc user to the userbase for connection to its interface? using Bridge mode?
virgil_machine
Posts: 70
Joined: 25. Mar 2009, 19:42
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7, XP Home and Pro, Ubuntu 10.04, 11.04
Location: Cape Cod, MA, USA

Re: ODBC connection to mysql on vbox vm

Post by virgil_machine »

Thanks for the reply.

In both cases the user is added (privileges in phpmyadmin--I assume that's what you mean), and the server is on a bridged connection. The XP machine is on a separate host, not a bridged connection. The natty machine (on the same host as the vm I'm using as a mysql server) also has a bridged connection.

In the natty/lucid setup, I did not add the user--I guess that happened when I set up the connection that doesn't connect?--the host is designated by name rather than ip.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: ODBC connection to mysql on vbox vm

Post by vbox4me2 »

Is the mysql port open and listening? any messages in the mysql logs?
virgil_machine
Posts: 70
Joined: 25. Mar 2009, 19:42
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7, XP Home and Pro, Ubuntu 10.04, 11.04
Location: Cape Cod, MA, USA

Re: ODBC connection to mysql on vbox vm

Post by virgil_machine »

var/log/mysql/error.log is empty (on the lucid/natty setup)

"telnet ip-address 3306" does not respond...mysql documentation says that's what I want. Note that I only have this problem on vms--not on physical hosts..would there be a difference?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: ODBC connection to mysql on vbox vm

Post by vbox4me2 »

If 3306 does not respond its a simple matter ain't it? run a port listener on the VM and see if any service is listening on 3306, either the server is mis-configured or a firewall/host filter is blocking the port from the outside.
virgil_machine
Posts: 70
Joined: 25. Mar 2009, 19:42
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7, XP Home and Pro, Ubuntu 10.04, 11.04
Location: Cape Cod, MA, USA

Re: ODBC connection to mysql on vbox vm

Post by virgil_machine »

Thank you, but I don't see how that explains why I can get to mysql databases on physical machines but not on vms.

When I sudo nmap -T Aggressive -A -v 127.0.0.1 -p 1-65000 on the vm hosting the db, I see port 3306. If I supply the ip (192.162.x.xxx) I do not see it. However, I don't know what to do with that information.
Post Reply