Access mysql on guest from host

Discussions related to using VirtualBox on Windows hosts.
Post Reply
edwardlynn
Posts: 5
Joined: 25. Jun 2009, 15:18
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Ubuntu server

Access mysql on guest from host

Post by edwardlynn »

I'm running vista as host, ubuntu as guest. Mysql is running fine on the guest, but i cannot access it from host. I have a user which has perms to access from any host. I cannot however access it, and i've read some bits on the net where people are saying they have set up some port forwarding or something. Can anyone give me any clues as to where to start on this issue please?

Thanks

Ed
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Access mysql on guest from host

Post by Perryg »

Section 6.4 of the VBox users guide covers this. Actually all of section 6 should be your starting place.
If you do not have a real reason to use NAT you should consider using Bridged and your problems should taken care of. This more closely resembles a network environment IMHO.
edwardlynn
Posts: 5
Joined: 25. Jun 2009, 15:18
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Ubuntu server

Re: Access mysql on guest from host

Post by edwardlynn »

I am actually using bridged, and can ping the guess os ip.

Thanks
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Access mysql on guest from host

Post by vbox4me2 »

Is the mysql user allowed to access the DB ? (ea. user@%), firewall ?
edwardlynn
Posts: 5
Joined: 25. Jun 2009, 15:18
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Ubuntu server

Re: Access mysql on guest from host

Post by edwardlynn »

I had a firewall switched on on the host os, but switching it off didn't fix the issue. No idea about ubuntu servers default setup though, i'll have to have a dig in the docs or something for that one.

The user does have access.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Access mysql on guest from host

Post by vbox4me2 »

As far as I've read linux filewalls any port above 1000.
edwardlynn
Posts: 5
Joined: 25. Jun 2009, 15:18
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Ubuntu server

Re: Access mysql on guest from host

Post by edwardlynn »

So that would include mysql then? on 6603 by default i think is it?
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Access mysql on guest from host

Post by baf »

Most linuxes does not firewall ports.
But mysql usually only talks with localhost.
Check in /etc/my.cnf after a line
skip-networking
and comment that out then restart mysql
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
edwardlynn
Posts: 5
Joined: 25. Jun 2009, 15:18
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Ubuntu server

Re: Access mysql on guest from host

Post by edwardlynn »

Thanks for al your help. It was caused by mysql now binding to localhost by default. Removed bind-address from my.cnf and restarted and its sorted. Sweet.
Post Reply