How to access remote mysql host on Ubuntu inside VMware?
- by Nick Grossman
Hi,
I'm running Ubuntu 10.10 inside VMware fusion on Mac OSX Snow Leopard. Inside ubuntu, I'm attempting to use command-line mysql to connect to a database hosted on a separate web server. For some reason, mysql misinterprets the remote hostname as a local address, and is not able to connect to the database.
Steps: (from ubuntu inside VMware)
mysql -u <my-username> -h mysql-2.sandbox.wrkng.net -p
Enter Password: <my password>
expected: to log into mysql
got:
ERROR 1045 (28000): Access denied for user '<my-username>'@'c-71-233-98-90.hds1.ma.comcast.net' (using password: YES)
Note that the hostname referenced in the error message is different than the one I inputted to the mysql command.
Also, performing the same command from the Mac (host of the VM) terminal successfully connects to the database.
I am not seasoned with VMware or linux, so I may be missing something obvious here -- it seems like somewhere along the way either ubuntu or the VM has a networking issue. Note also that accessing the internet via ubuntu inside the VM works fine.
Any help is greatly appreciated. Thanks!