MySQL Forums
Forum List  »  Security

Re: Connect to mysql database on Ubuntu host from windows guest
Posted by: Georgi Kodinov
Date: February 07, 2014 09:24AM

First of all you need to make sure the mysql server on your ubuntu host is listening on all interfaces.
This is easy to check on the ubuntu command line :
$ netstat -a | grep mysql | grep tcp
tcp6 0 0 [::]:mysql [::]:* LISTEN

Then you need to set up your user definitions so that they accept logins from your windows guest.

The easiest way to do this is to allow access from all hosts by using the "%" wildcard instead of a host name, e.g.

create user testuser@'%' identified by 'pass';

Of course you can be more specific and use your windows host's name.

On your windows command line execute "ipconfig /all" and you will get all the IP data for all of your network interfaces.
Find the IPv4 address of the vmware's virtual adapter and use that instead of the '%' in the above statement.


Now it's time to set up your windows guest.
You will need to install some mysql client into it.
From your question I see that you're trying to use ODBC. So I'll go with that.
In order to connect to a mysql server you'll need the mysql odbc driver.
You can get it from here :http://dev.mysql.com/downloads/connector/odbc/
There's a guide on how to do this at http://dev.mysql.com/doc/connector-odbc/en/connector-odbc-installation-binary-windows.html

Once you install it you'll need to create an ODBC DSN.
Look into http://dev.mysql.com/doc/connector-odbc/en/connector-odbc-configuration-dsn-windows.html on how this is done.

And make sure you use the proper ip address/host name for your ubuntu host (the same you're using when pinging it).

Once you have the DSN you can use it in windows tools like e.g. ODBCtest.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Connect to mysql database on Ubuntu host from windows guest
3598
February 07, 2014 09:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.