How to access remote mysql host on Ubuntu inside VMware?

Posted by Nick Grossman on Stack Overflow See other posts from Stack Overflow or by Nick Grossman
Published on 2011-01-01T20:48:05Z Indexed on 2011/01/01 20:54 UTC
Read the original article Hit count: 165

Filed under:
|
|

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!

© Stack Overflow or respective owner

Related posts about mysql

Related posts about ubuntu