Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am on a Windows 7 machine running a Ubuntu Virtualbox as my local web server and database server (MySQL).

I just got a hold of a copy of Komodo which I am running on my Windows machine. I would like to hook it up to my database.

The fields it needs are hostname, port, socket, username and password.

I know the username/password but am unsure how to find out what to put for the other fields. The Ubuntu VB has an IP of 192.168.0.25, which is in my hosts file as http://sstmag.dev

I hope I have asked this in the right place, I've been searching google but am having trouble finding an answer, any help much appreciated.

share|improve this question
    
Did you try using the IP of your Ubuntu VM? If yes, what happened? The default port for mySQL should be 3306. –  Indrek Oct 8 '12 at 12:19
    
Yes, I just tried with 3306 as the port and the above ip for my vm, which leaves the socket field empty. when I try to connect with these settings it says "Error (2003, Cannot Connect to MYSQL Server on '192.168.0.10' (10061) When I set up Komodo I gave it permission to access the local network. –  WebweaverD Oct 8 '12 at 12:27

1 Answer 1

There are a few things to check:

  1. The VirtualBox machine should have access to your network (or vice-versa), namely a Windows application should know how to reach your VM. If you set up networking as NAT in VirtualBox, this won’t work. Try the bridged networking or host-only networking.

  2. If networking in general works, that is, your windows machine can ping the VM (and maybe even access the web server), you should make sure that MySQL exposes itself to the external network - by default, MySQL only listens on 127.0.0.1. Check the bind-address statement in /etc/mysql/my.cnf or a similar configuration file on Ubuntu.

  3. Having done that, you should check whether telnet’ing to the IP and port works from your Windows machine. If it does, Komodo should also work, provided that you configured it correctly.

share|improve this answer
    
Ok, having resolved some other issues, I'm back on this, I have set the bind address as suggested, no joy. when i try to connect through komodo or telnet 3306 I get the error: EHOST 192.168.0.20 is not allowed to connect to this mysql server. telnetting port 23 says connection failed. What should I have put as the bind address - I entered the guest machines ip? I can connect to the apache webpage through browser. Interesting thing is my host ip is 192.168.56.1 and guest ip is 192.168.0.25 so I have no idea where 192.168.0.20 error is coming from –  WebweaverD Oct 11 '12 at 17:03
    
Could you clarify, please: Are you able to connect to the guest system’s webserver from the host system (i.e. something like 192.168.0.25 in the hosts webbrowser gives you the webserver on the guest system)? –  Claudius Oct 11 '12 at 17:09
    
web page on guest webserver loads fine in browser on host system or guest system –  WebweaverD Oct 11 '12 at 17:16
    
Does telnet 192.168.0.25 3306 on the host system work? Furthermore, is MySQL bound to port 3306 on an external IP of the guest system (check netstat -tulpen). Sorry for the guesswork, but it is rather difficult to debug remote problems :-) –  Claudius Oct 11 '12 at 17:19
    
no telnet 192.168.0.25 3306 doesnt work on host system, thats where I got the above error: EHOST 192.168.0.20. is not allowed to connect. When I run netstat -tulpen the first line reads tcp 9952 0 192.168.0.25:3306 0.0.0.0:* LISTEN 115 –  WebweaverD Oct 11 '12 at 17:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.