My purpose: I want two bridged Ubuntu VMs (on one mysql server is setup, and on the other apache and php) to be able to talk to each other. Now I've taken all steps related to setting up the apps on each VM and configuring both apache and mysql, also gave VMs static ip addresses and they can ping each other. Now, mysql VM can see a webpage served by the other, while, the apache system can not connect to the VM running mysql server.

Things I've done: I've searched and I've tried these(and still not working):

  1. I added "bind-address=" in "my.cnf" and commented out the one with
  2. 3306 port might be closed on mysql VM. so I opened it using ufw(verified using ufw status verbose) but still when doing "telnet ip-address 3306", I get "connection refused".
  3. disabling ufw (ufw disable), I thought all ports would get opened, but still I can't even telnet to it on 3306 port.
  4. "sudo ufw app list" did not suggest "mysql", so I added a rule in INI format to applications.d directory for mysql like below:
description=db management

now after restarting the ufw, when I do sudo ufw app list it gives this warning:

WARN: Skipping 'mysql': also in /etc/services
Available applications:

My question: why can't I telnet to the mysql server VM(I can't even when I disable ufw)? Is there anything else that might be stumbling connection? I asked this in this forum because it more seems to be something with Ubuntu and ufw and doesn't seem to be a networking problem.

(I'm not knowledgeable in Ubuntu and I'd be grateful if you mention any dumb wrong assumptions I've made in the above steps.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.