LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-29-2006, 07:57 PM   #1
strimp099
Member
 
Registered: Mar 2004
Location: Chicago
Distribution: Fedora 12
Posts: 56

Rep: Reputation: 15
connecting to mysql on linux from windoze


Hi:
I am interested in connecting to my MySql database that is running (default install) on FC4. I want to connect to the db with my Windoze machine using MySql Query Browser. Both machines are behind a router; the gateway is 192.168.0.1. The Linux ip address is 192.168.0.50 and the windows is 192.168.0.11 (both static). I guess I need to learn how to determine the mysql host and port when connecting. I thought it would just be 192.168.0.50 and 3306 respectively, it's not working. Any ideas?
Thanks
 
Old 01-29-2006, 08:14 PM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
you can always connect with the ip address and the default port for mysql is 3306. if you can't connect, check to see if you have port 3306 open on your firewall. you'd have to open up port 3306 in the linux machine with IPtables.

edit: also, when connecting, i believe you need to specify a mysql user and the mysql user's password. At least that's how the older mysql administrator used to work.

Last edited by megaspaz; 01-29-2006 at 08:16 PM.
 
Old 01-29-2006, 09:03 PM   #3
strimp099
Member
 
Registered: Mar 2004
Location: Chicago
Distribution: Fedora 12
Posts: 56

Original Poster
Rep: Reputation: 15
Hi - thanks for the reply.

I ran nmap on my linux machine and 3306 is open:

Code:
[root@furnace ~]# nmap furnace.strimpel.net

Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2006-01-29 20:58 CST
Interesting ports on furnace.strimpel.net (192.168.0.50):
(The 1658 ports scanned but not shown below are in state: closed)
PORT      STATE SERVICE
22/tcp    open  ssh
80/tcp    open  http
111/tcp   open  rpcbind
3306/tcp  open  mysql
10000/tcp open  snet-sensor-mgmt

Nmap finished: 1 IP address (1 host up) scanned in 0.289 seconds
I am getting the error message 2003:
Can't connect to MySQL server on '192.168.0.50'(10060)

I also tried to log in as user:

root@furnace.strimpel.net

No dice.
 
Old 01-29-2006, 09:08 PM   #4
sasho
Member
 
Registered: Jan 2005
Distribution: Arch
Posts: 120

Rep: Reputation: 17
Quote:
Originally Posted by strimp099
Hi:
I am interested in connecting to my MySql database that is running (default install) on FC4. I want to connect to the db with my Windoze machine using MySql Query Browser. Both machines are behind a router; the gateway is 192.168.0.1. The Linux ip address is 192.168.0.50 and the windows is 192.168.0.11 (both static). I guess I need to learn how to determine the mysql host and port when connecting. I thought it would just be 192.168.0.50 and 3306 respectively, it's not working. Any ideas?
Thanks
Just to make sure since it wasn't explicitly mentioned: do you have the mysql ODBC drivers already installed on your windows machine?
 
Old 01-29-2006, 09:16 PM   #5
strimp099
Member
 
Registered: Mar 2004
Location: Chicago
Distribution: Fedora 12
Posts: 56

Original Poster
Rep: Reputation: 15
I sure don't. I should try that huh?
 
Old 01-29-2006, 09:23 PM   #6
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
what you need is the mysql administrator for your windows machine.

http://dev.mysql.com/downloads/administrator/index.html

you can set up your hosts and users for that host. it should come with all the drivers necessary.

I don't know much about the query browser or this iteration of administrator as I'm using the old version of administrator on linux.

Gimme a couple of ticks and I can show you screenshots of the mysql control center I'm using. I would imagine the mysql administrator would have similar functionality.
 
Old 01-29-2006, 09:41 PM   #7
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
Ok. My version of mysql control center has administration and a query browser built in. I'm wondering if you need both the query browser and the mysql administration package. Like, maybe the broke up the components. So what was one package for mysql control center, is now 2 packages - the query browser and mysql administrator.

Administration Window - program start up
Administrator Window - Host set up
Administration Window - Connecting to host
Administration Window - Successful connection. - Notice the computer icon next to sa@tron on left side. It's green instead of red.
Query Browser Window - just some commands

So just check into getting both the query browser and the mysql administrator.

Edit: This is the linux version of mysqlcc. There is a windows version of this, but i think mysqlcc is no longer available from mysql's site for either platform. There should be windows version of the query browser and mysql administrator available though.

Last edited by megaspaz; 01-29-2006 at 09:42 PM.
 
Old 01-29-2006, 09:52 PM   #8
accessrichard
Member
 
Registered: Apr 2005
Distribution: Fedora Core (latest version)
Posts: 156

Rep: Reputation: 30
I don't know anything about the query browser you refer of, but when I install mysql on windows and connect to my linux box I have to make sure I set up the correct priviledges on my linux box, specifically, I make sure to tell mysql that it is ok for a user with a specific ip address to connect to my db using,
$ mysql -u root -p password
mysql> grant all on databasename.* to user@"ipaddress" identified by "user";
mysql> flush privileges;
mysql> quit
 
Old 01-29-2006, 10:00 PM   #9
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
Quote:
Originally Posted by accessrichard
I don't know anything about the query browser you refer of, but when I install mysql on windows and connect to my linux box I have to make sure I set up the correct priviledges on my linux box, specifically, I make sure to tell mysql that it is ok for a user with a specific ip address to connect to my db using,
$ mysql -u root -p password
mysql> grant all on databasename.* to user@"ipaddress" identified by "user";
mysql> flush privileges;
mysql> quit
Yes, you do need to make sure this is done. This would also be true if you're mysql database was running on windows. Also, if you don't care about which machine the user is attempting to connect from, you can substitute 'ipaddress' in the command quoted to '%'. I think the grant command above is not exactly correct, either. but anyhoo...

example -

user = foo
host = %
password = foobar
databasename = somedatabase

mysql> grant all privileges on somedatabase.* to 'foo'@'%' identified by 'foobar';
mysql> flush privileges;

optionally you can give the user grant options also:

mysql> grant all privileges on somedatabase.* to 'foo'@'%' identified by 'foobar' with grant option;
mysql> flush privileges;

The quotes in the command example are required. You'll usually want to do this twice. one for the any host ('%') and one for localhost ('localhost').

Last edited by megaspaz; 01-29-2006 at 10:03 PM.
 
Old 01-31-2006, 08:54 AM   #10
strimp099
Member
 
Registered: Mar 2004
Location: Chicago
Distribution: Fedora 12
Posts: 56

Original Poster
Rep: Reputation: 15
Thank you for the replies, I will give your suggestions a try and post the results.
 
Old 01-31-2006, 04:09 PM   #11
strimp099
Member
 
Registered: Mar 2004
Location: Chicago
Distribution: Fedora 12
Posts: 56

Original Poster
Rep: Reputation: 15
Hey all:

I tried your suggestions, with no avail. It keeps saying the same thing, can't connect. I don't think it is a problem with the permissions, as I would receive an error indicating as such. I think it is a problem with the host.

Shouldn't I just be putting in the IP address of the machine with the MySQL DB (the Linux machine - 192.168.0.50)?

The Query Browser can be found here
http://www.mysql.com/products/tools/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql, windoze, and libmysql.dll jiml8 Programming 1 03-26-2005 05:27 PM
Connecting to Mysql blood_omen Debian 6 07-23-2004 01:20 AM
connecting to mysql dkc_ace Linux - General 2 03-22-2003 07:18 PM
Connecting to mysql webee Linux - Software 2 01-30-2003 02:47 PM
Mysql is not connecting from servlet.But connecting from java, help pls Harish_f Linux - General 0 05-08-2002 03:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration