Click to See Complete Forum and Search --> : MySQL - Can't connect to MySQL Server 10061


swangods
09-28-2002, 07:02 PM
Okay, I can't find anything of value on google or on the board yet.

I'm trying to run MySQL on my local network. The service seems to start up fine, and when I'm logged into the server I can access everything just fine through command-line mysql. Attempts to connect via MySQLGui on that machine and another machine, as well as ODBC from a Windows machine, fail.

I suspect it's a port problem. MySQLGui and the ODBC driver default to 3306. In addition, /etc/mysql/mf.cnf lists the port as 3306 under both [client] and [mysqld].

In my home directory though, for the user I've been using to test from command line, .mysql.options listed port as 111. I've tried changing that line 3306, no luck. I've tried changing all port values to 111, no luck. When I try connecting through 111 with WinSQL (which just opens up an ODBC connect and acts as a SQL interpreter, it's a great tool) it hangs. nmap actually shows 111 open to sunrpc, and nothing for 3306.

So I get the message below when trying to use 3306 for mysqlgui or odbc. In case the image doesn't come through, it's basically complaining about "ODBC Error:(TCX)(MyODBC)Can't connect to MySQL server on phoenix (10061)" The error through mysqlgui is pretty much the same thing, referencing the 10061 problem. Phoenix is a recognizable dns entry, and I've even tried entering by IP address. The reason I suspect a ports problem is the nmap results not showing 3306. But if the daemon is set to run on 3306, shouldn't it open that port? I've tried with and without passwords as well in case that might be an issue. It just seems that it doesn't want to find anything out there.

Addendum: the exact error in mysql gui is: "Can't connect to MySQL server on 'phoenix' (10061)."

Any suggestions?? Thanks!

http://www.ililypad.com/images/10061.jpg

bwkaz
09-28-2002, 07:48 PM
Is there a firewall running on phoenix? Does it have iptables installed?

It might be that the firewall is blocking that port...

swangods
09-28-2002, 08:30 PM
Originally posted by bwkaz
Is there a firewall running on phoenix? Does it have iptables installed?

It might be that the firewall is blocking that port...

No firewall on this machine (that i know of)... and it doesn't seem that iptables is running (ps e and ps aux).

I even tried setting the server to localhost in mysqlgui and it says it can't connect.

swangods
09-28-2002, 09:55 PM
I didn't mention earlier that this is an install attempt on Libranet 2.7. I just tried installing MySQL on a Red Hat 7.3 system and had no problems. nmap reveals that 3306 is handling mysql services, and connection is no problem. I imagine that this is in fact a problem with the security/port/etc settings on the Libranet system.

Kind of an unusual way to phrase a question for what's supposed to be a secure OS... but how can I force that port to be open for users to connect to?

bwkaz
09-28-2002, 09:55 PM
iptables wouldn't be a process, but it would be listed in lsmod. Check and see (look for ip_tables).

I don't seriously think that's the problem, but I don't know of anything else to look for...

What does telnetting to that port tell you? Normally telnet is really bad, but in cases like this (and Web servers), sometimes it helps. telnet phoenix 3306 assuming you have a telnet installed (do it from the Windows box if all else fails), and see which error you get.

swangods
09-28-2002, 10:28 PM
iptables isn't showing up in lsmod (neither is ipchains).

and i just get a generic connection refused when trying to telnet 3306.

i will double-check on any sort of firewalling going on.... thanks for your help so far!

swangods
06-08-2003, 07:42 PM
months later, but i ran into this problem again but was able to fix it!

in /etc/mysql/my.conf... comment out the skip-networking part. that'll open up 3306 for mysql connections.