Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Huge issues connecting to mysql server

Status
Not open for further replies.

MercJones

IS-IT--Management
Aug 2, 2007
29
GB
ive got 2 linux servers, each runs mysql on tcp 3306 and an httpd on tcp 80.

I can telnet to port 80 from server 1 to server 2 and visa versa, but can't telnet to port 3306 from server 1 to server 2 and visa versa.

I can telnet to both 80 and 3306 on both servers from a 3rd server ive got, I can also telnet to 3306 on someone elses server from both of them. Any ideas why I cant connect properly?
 
look in the settings. The obvious thing to check is if the servers are running the mysql deamon or server process. Even then, it may be set up with "no networking". In that case, you can only connect to them using a socket file.
 
Hi DonQuichote.

ive checked if mysql is running and it definately is. I can use it from the console.. plus I can use it from my 3rd server (so from my 3rd server I can connect to the mysql server and perform queries) so its something on the server1 or server2 stopping server1 connecting to mysql on server 2 and vise versa :s
 
What exactly happens when you try to telnet to port 3306?
Any error messages?
Or just hanging?
 
from the normal non-server pc im using now, if i telnet to the newserver ip: TELNET NEWSERVERIP 3306 it shows me:

M
5.0.22-Debian_0ubuntu6.06.5-log"!bN@5&_0,?kO'r//?-b(@G

Connection to host lost.

within a few seconds.


If im using the OLD server shell, and telnet to the newserver, TELNET NEWSERVERIP 3306 it hangs for just over 3 minutes, and then shows the below:

[root@localhost ~]# telnet NEWSERVERIP 3306
Trying NEWSERVERIP...
telnet: connect to address NEWSERVERIP: Connection timed out
telnet: Unable to connect to remote host: Connection timed out
[root@localhost ~]#
 
To me, this looks like the old server is refused connection by the telnet daemon or the OS. So it could be a firewall setting on server2. Post 80 is open to anybody because it is (or could act as) a webserver, but port 3306 may have more strict permissions for security reasons.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top