Page 1 of 1

Access mysql on guest from host

Posted: 25. Jun 2009, 15:26
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

Re: Access mysql on guest from host

Posted: 25. Jun 2009, 16:29
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.

Re: Access mysql on guest from host

Posted: 25. Jun 2009, 16:38
by edwardlynn
I am actually using bridged, and can ping the guess os ip.

Thanks

Re: Access mysql on guest from host

Posted: 25. Jun 2009, 16:48
by vbox4me2
Is the mysql user allowed to access the DB ? (ea. user@%), firewall ?

Re: Access mysql on guest from host

Posted: 25. Jun 2009, 17:06
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.

Re: Access mysql on guest from host

Posted: 25. Jun 2009, 18:11
by vbox4me2
As far as I've read linux filewalls any port above 1000.

Re: Access mysql on guest from host

Posted: 26. Jun 2009, 11:51
by edwardlynn
So that would include mysql then? on 6603 by default i think is it?

Re: Access mysql on guest from host

Posted: 26. Jun 2009, 11:57
by vbox4me2
Mysql sits on port 3306.

Re: Access mysql on guest from host

Posted: 26. Jun 2009, 12:37
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

Re: Access mysql on guest from host

Posted: 26. Jun 2009, 18:36
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.