Host OS is Windows10. Guest OS is Ubuntu 18.04 running on Oracle VirtualBox.
In the VirtualBox setting I set the Network setting to NAT and set up port forwarding ( 127.0.1.1:3306->10.0.2.15:3306 ... did the same with port 22 and 80 )
In the browser, I can reach the localhost when I go to 127.0.1.1.
In the terminal, I can connect through SSH successfully with [email protected].
But when I try to use mySQL Workbench to connect to mysql I get an error.
Lost connection to mySQL server at 'reading initial communication packet', system error: 0
my Workbench connection setting is:
Conection Method: Standard TCP/IP
Hostname: 127.0.1.1 Port: 3306
Username: root or admin user.
I edited the my.cnf file to bind address 0.0.0.0
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysql]
bind-address = 0.0.0.0
I tried to connect with my 'root' user and password. I created an 'admin' user and gave it all privileges and still no success.
Any help is greatly appreciated. This is my first trying to run my local server on VirtualBox, so I might be missing something very basic.
Thank you!