Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Local telnet 3306 not working but remote telnet is ok

Posted on 2009-04-15
15
1,473 Views
Last Modified: 2012-05-06
Hi all,

i'm setting up MySQL server on a new box. ive opened the port 3306 and i can do a remote telnet no probs. but when i do a local telnet to 3306 it fails to connect.

any ideas?
0
Comment
Question by:bede123
  • 7
  • 6
  • 2
15 Comments
 
LVL 3

Expert Comment

by:ealcaniz
ID: 24148008
Do you have a firewall?
Use netstat -a to look if the port is open for all interfaces. The best is use wireshark or network trace to see what happens.
0
 
LVL 1

Author Comment

by:bede123
ID: 24148068
i did netstat, can you help me understand what this is telling me?


Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\Administrator>netstat -a

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    s15345860:echo         s15345860:0            LISTENING
  TCP    s15345860:discard      s15345860:0            LISTENING
  TCP    s15345860:daytime      s15345860:0            LISTENING
  TCP    s15345860:qotd         s15345860:0            LISTENING
  TCP    s15345860:chargen      s15345860:0            LISTENING
  TCP    s15345860:smtp         s15345860:0            LISTENING
  TCP    s15345860:http         s15345860:0            LISTENING
  TCP    s15345860:epmap        s15345860:0            LISTENING
  TCP    s15345860:microsoft-ds  s15345860:0            LISTENING
  TCP    s15345860:1025         s15345860:0            LISTENING
  TCP    s15345860:1030         s15345860:0            LISTENING
  TCP    s15345860:1036         s15345860:0            LISTENING
  TCP    s15345860:1037         s15345860:0            LISTENING
  TCP    s15345860:1038         s15345860:0            LISTENING
  TCP    s15345860:1052         s15345860:0            LISTENING
  TCP    s15345860:1056         s15345860:0            LISTENING
  TCP    s15345860:2522         s15345860:0            LISTENING
  TCP    s15345860:2616         s15345860:0            LISTENING
  TCP    s15345860:2930         s15345860:0            LISTENING
  TCP    s15345860:3306         s15345860:0            LISTENING
  TCP    s15345860:ms-wbt-server  s15345860:0            LISTENING
  TCP    s15345860:6085         s15345860:0            LISTENING
  TCP    s15345860:6086         s15345860:0            LISTENING
  TCP    s15345860:7999         s15345860:0            LISTENING
  TCP    s15345860:9921         s15345860:0            LISTENING
  TCP    s15345860:9951         s15345860:0            LISTENING
  TCP    s15345860:9961         s15345860:0            LISTENING
  TCP    s15345860:19997        s15345860:0            LISTENING
  TCP    s15345860:19998        s15345860:0            LISTENING
  TCP    s15345860:51800        s15345860:0            LISTENING
  TCP    s15345860:1044         s15345860:9951         ESTABLISHED
  TCP    s15345860:1942         s15345860:51800        CLOSE_WAIT
  TCP    s15345860:1948         s15345860:51800        CLOSE_WAIT
  TCP    s15345860:1976         s15345860:9961         TIME_WAIT
  TCP    s15345860:1977         s15345860:9921         TIME_WAIT
  TCP    s15345860:1978         s15345860:9961         TIME_WAIT
  TCP    s15345860:1979         s15345860:9921         TIME_WAIT
  TCP    s15345860:1980         s15345860:9961         TIME_WAIT
  TCP    s15345860:1981         s15345860:9921         TIME_WAIT
  TCP    s15345860:1982         s15345860:9961         TIME_WAIT
  TCP    s15345860:1983         s15345860:9921         TIME_WAIT
  TCP    s15345860:9951         s15345860:1044         ESTABLISHED
  TCP    s15345860:51800        s15345860:1942         FIN_WAIT_2
  TCP    s15345860:51800        s15345860:1948         FIN_WAIT_2
  TCP    s15345860:netbios-ssn  s15345860:0            LISTENING
  TCP    s15345860:1957         s15345860:2616         CLOSE_WAIT
  TCP    s15345860:1959         s15345860:2616         CLOSE_WAIT
  TCP    s15345860:2616         s15345860:1957         FIN_WAIT_2
  TCP    s15345860:2616         s15345860:1959         FIN_WAIT_2
  TCP    s15345860:ms-wbt-server  xx:35419  ESTABLISH
  UDP    s15345860:echo         *:*
  UDP    s15345860:discard      *:*
  UDP    s15345860:daytime      *:*
  UDP    s15345860:qotd         *:*
  UDP    s15345860:chargen      *:*
  UDP    s15345860:snmp         *:*
  UDP    s15345860:microsoft-ds  *:*
  UDP    s15345860:isakmp       *:*
  UDP    s15345860:1027         *:*
  UDP    s15345860:1029         *:*
  UDP    s15345860:1032         *:*
  UDP    s15345860:1034         *:*
  UDP    s15345860:ms-sql-m     *:*
  UDP    s15345860:1645         *:*
  UDP    s15345860:1646         *:*
  UDP    s15345860:radius       *:*
  UDP    s15345860:radacct      *:*
  UDP    s15345860:3456         *:*
  UDP    s15345860:ipsec-msft   *:*
  UDP    s15345860:ntp          *:*
  UDP    s15345860:1026         *:*
  UDP    s15345860:1028         *:*
  UDP    s15345860:1031         *:*
  UDP    s15345860:1033         *:*
  UDP    s15345860:1062         *:*
  UDP    s15345860:1063         *:*
  UDP    s15345860:1935         *:*
  UDP    s15345860:1952         *:*
  UDP    s15345860:3456         *:*
  UDP    s15345860:ntp          *:*
  UDP    s15345860:netbios-ns   *:*
  UDP    s15345860:netbios-dgm  *:*

C:\Documents and Settings\Administrator>
0
 
LVL 3

Expert Comment

by:ealcaniz
ID: 24148246
ok only if you are listening for all the networks. But seems ok. Use a network monitor or wireshark to capture a network trace file.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 29

Expert Comment

by:fosiul01
ID: 24148980
so you saying

you can telnet remotely /: telnet ip_of_your_server 3306  : which works

but telnet localhost 3306 : does nto working

right ?

have you change the ip ( bind ip address ) of your my.cnf file ???
0
 
LVL 1

Author Comment

by:bede123
ID: 24149087
yes that's correct.

bind ip address? no i havent alterned that. should i?

0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24149148
Ok hold on

is this saying something like this

LHost 'localhost ' is not allowed to connect to this MySQL serverConnection closed by foreign host. ??

or its just unable to connect ???
0
 
LVL 1

Author Comment

by:bede123
ID: 24149172
it says "could not open connection to the host on port.....

0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24149188
can you try by using the Ip address of your pc ??

telnet ip_of_this_pc 3306 ??
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24149208
also check

netstat -an

past the ouput here, previoiusly the ouput you attached it does not show the IP
0
 
LVL 1

Author Comment

by:bede123
ID: 24149412
doing telnet with the ip produces the same result.  here is the reult from netstat -an


C:\Documents and Settings\Administrator>netstat -an

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:7              0.0.0.0:0              LISTENING
  TCP    0.0.0.0:9              0.0.0.0:0              LISTENING
  TCP    0.0.0.0:13             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:17             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:19             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:25             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1025           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1030           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1036           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1037           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1038           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1052           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1056           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:2522           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:2616           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:2930           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:6085           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:6086           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:7999           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:9921           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:9951           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:9961           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:19997          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:19998          0.0.0.0:0              LISTENING
  TCP    0.0.0.0:51800          0.0.0.0:0              LISTENING
  TCP    127.0.0.1:1044         127.0.0.1:9951         ESTABLISHED
  TCP    127.0.0.1:2420         127.0.0.1:9961         TIME_WAIT
  TCP    127.0.0.1:2421         127.0.0.1:9921         TIME_WAIT
  TCP    127.0.0.1:2422         127.0.0.1:9961         TIME_WAIT
  TCP    127.0.0.1:2423         127.0.0.1:9921         TIME_WAIT
  TCP    127.0.0.1:2424         127.0.0.1:9961         TIME_WAIT
  TCP    127.0.0.1:2425         127.0.0.1:9921         TIME_WAIT
  TCP    127.0.0.1:2426         127.0.0.1:9961         TIME_WAIT
  TCP    127.0.0.1:2427         127.0.0.1:9921         TIME_WAIT
  TCP    127.0.0.1:2428         127.0.0.1:9961         TIME_WAIT
  TCP    127.0.0.1:2429         127.0.0.1:9921         TIME_WAIT
  TCP    127.0.0.1:9951         127.0.0.1:1044         ESTABLISHED
  TCP    xx.xx.xx.xx:139      0.0.0.0:0              LISTENING
  TCP    xx.xx.xx.xx:3389     xx.xxx.xx.xx:36079   ESTABLISHED
  UDP    0.0.0.0:7              *:*
  UDP    0.0.0.0:9              *:*
  UDP    0.0.0.0:13             *:*
  UDP    0.0.0.0:17             *:*
  UDP    0.0.0.0:19             *:*
  UDP    0.0.0.0:161            *:*
  UDP    0.0.0.0:445            *:*
  UDP    0.0.0.0:500            *:*
  UDP    0.0.0.0:1027           *:*
  UDP    0.0.0.0:1029           *:*
  UDP    0.0.0.0:1032           *:*
  UDP    0.0.0.0:1034           *:*
  UDP    0.0.0.0:1434           *:*
  UDP    0.0.0.0:1645           *:*
  UDP    0.0.0.0:1646           *:*
  UDP    0.0.0.0:1812           *:*
  UDP    0.0.0.0:1813           *:*
  UDP    0.0.0.0:3456           *:*
  UDP    0.0.0.0:4500           *:*
  UDP    127.0.0.1:123          *:*
  UDP    127.0.0.1:1026         *:*
  UDP    127.0.0.1:1028         *:*
  UDP    127.0.0.1:1031         *:*
  UDP    127.0.0.1:1033         *:*
  UDP    127.0.0.1:1062         *:*
  UDP    127.0.0.1:1063         *:*
  UDP    127.0.0.1:3456         *:*
  UDP    217.160.xx.xx:123      *:*
  UDP    217.160.xx.xx:137      *:*
  UDP    217.160.xx.xx:138      *:*

C:\Documents and Settings\Administrator>
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24149562
Ok

in mysql, have you give localhost to access mysql ???

i mean, does root has privilige on localhost ???
0
 
LVL 1

Author Comment

by:bede123
ID: 24149593
does this answer your question?

if not please direct me. thanks
mysql-root.jpg
0
 
LVL 29

Accepted Solution

by:
fosiul01 earned 500 total points
ID: 24149639
ok have you tryid to tellnet like ehtis

telnet 127.0.0.1 3306 ?

does it the same problem ??
0
 
LVL 1

Author Comment

by:bede123
ID: 24149693
doh!

yes of course, that works . thanks very much
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24149780
haha LOL

i realzied in my mysql server administration, its saying localhost

but your one its saying 127.0.0.1

it might you need to add localhost name in C:\WINDOWS\system32\drivers\etc\ host file ..
then try to do
telnet localhost 3306, its should work ...


0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Creating and Managing Databases with phpMyAdmin in cPanel.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question