mysqldnsvirtualboxfirewallmysql-error-2003

MySQL:Error 2003 lost connection from a virtual machine on the same localnetwork


Apologies for the bad english, i'm french. :D

I've been looking for an answer since approximatively 4 days, and I don't know how to fix my issue.

So:

I want to virtualize two servers using virtualBox on Windows7 and i want them all on the same local network. My VMs are running on Ubuntu 16.04

On the first VM I installed a lamp web server with MySQL 5.7 and i add phpmyadmin. On the second VM I installed Jira standalone

--> I need to connect to my Database from my Jira server

So I used the Bridge adapter on each machine:

network configuration

network configuration

Ip adresses are attributed with the DHCP protocol.

I'm able to ping each machine so there is no problem.


  1. SQL server

When I start the machine everything seems to work, i can access from my SQL server:

localhost : home page of apache 2 saying "It Works"

localhost:5671 :

[��� 5.7.18-0ubuntu0.16.04.1� ���UKBeM�ÿ÷�ÿ����������T(DGKg1hwd=�mysql_native_password���ÿ„Got packets out of order

localhost/phpmyadmin : the index page where I can connect perfectly with root.


  1. Host Machine (Windows)

192.168.6.80 : home page of apache 2 saying "It Works"

192.168.6.80:5671 :

[��� 5.7.18-0ubuntu0.16.04.1� ���UKBeM�ÿ÷�ÿ����������T(DGKg1hwd=�mysql_native_password���ÿ„Got packets out of order

192.168.6.80/phpmyadmin : the index page where I can connect perfectly with root.


  1. Jira server

Here when i start the machine it works during approximatively 2-3 minutes, I'am able to connect via:

mysql -u root -p -h 192.168.6.80 -P 5671 

I am perfectly connected and i can also access to all the other adresses.

And then it stop working on this machine only.

Unable to connect

Firefox can’t establish a connection to the server at 192.168.6.80.

The site could be temporarily unavailable or too busy. Try again in a few moments.

If you are unable to load any pages, check your computer’s network connection.

If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

And when i re-try to connect via mysql on terminal I get the Error 2003 (HYOOO)

This happen only when i use the connection of my work, at home it works perfectly without stopping!!

I have few leads:

i am in a private network with a domain name called something.eu And when i launch firefox the proxy shows up automatically: and-etc-ha.something.eu:9090

So i'm invited to enter my id and password. My id is : luc.myName@something.eu After that i'm connected to internet with firefox but not in terminal when i want to use apt.

I search on the web and i found this:

export http_proxy="http://Username:password@proxyip:port/"

and

export http_proxy="http://Domain\user:pasword@proxyip:port/"

So I tried different ways and i was able to download with apt. But the internet connexion with firefox was unstable. But if I use firefox on my host machine the connexion is perfect.

I also tried with settings -> network -> network proxy -> method manual

http: and-etc-ha.something.eu port: 9090

I don't know if I was understandable, tell me!^^ If you have any ideas to help me to solve this problem let me know.

Bye!


Solution

  • I found the cause: In fact there was a ip conflict inside the LAN because the DHCP was giving in-use ip address.

    I decide to use the NAT connection with Port Forwarding on VirtualBox.

    With that configuration I'm able to access my VMs on my LAN using the host ip address followed by the port of my choice.