On 1 Apr 2005 01:46:39 -0800, "Michael A. Capone" <ma******@yahoo.com>
wrote:
telnet 192.168.1.106 3306
Mr Capone. You were right! Something is wrong. I ran the telnet.
Here's what I got...
C:\WINDOWS>telnet 192.168.1.106 3306
Connecting To 192.168.1.106...Could not open connection to the host,
on port 3306: Connect failed
And, just to make sure, I ran a ping...
C:\WINDOWS>ping 192.168.1.106
Pinging 192.168.1.106 with 32 bytes of data:
Reply from 192.168.1.106: bytes=32 time<1ms TTL=64
Reply from 192.168.1.106: bytes=32 time<1ms TTL=64
Reply from 192.168.1.106: bytes=32 time<1ms TTL=64
Reply from 192.168.1.106: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.1.106:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\WINDOWS>
So I'm pinging but unable to telnet. Hmmm???
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Two things to check:
1. Go to Start -> Run and run this command:
telnet 192.168.1.106 3306
You should get a response like:
/
4.0.12-max-log!DM9rT,}R,C
If you wait a moment, mysql will close the connection automatically.
(the string above shows which version of mysql is running on the box).
If the telnet command gives an error message (i.e., "cannot connect to
host"), then that will tell you that either mysql is not running or
there's a firewall / router rule preventing you from accessing port
3306 on the box. Note that this test is mysql-permissions
independent,
since it couldn't even get as far as a user authentication.
2. If the above test is successful, then there's nothing
network/router/firewall-wise that is stopping you. Good. Now it'll
be
time to check mysql user permissions. You'll probably have to do
these
checks either from the Mysql Control center (as the previous poster
noted) or through the mysql client on the 192.168.1.106 box. If using
the local client, run these two queries within the "mysql" database:
mysql> SELECT Host, User from user;
.... and also...
mysql> SELECT Host, Db, User from db;
You'll be looking for some pattern in the "Host" column that indicates
that the host you are connecting *from* has access. '%' is a wildcard
meaning "all hosts". Unless that is present, there will need to be
some entry that matches your client machine.
Good luck!
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxx
Here's the screen output from the queries you asked me to run.
I'm afraid I cannot interpret the results.
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select host, user from user
-> ;
+-----------+------+
| host | user |
+-----------+------+
| appserver | |
| appserver | root |
| localhost | |
| localhost | root |
+-----------+------+
4 rows in set (0.00 sec)
mysql> select host, db, user from db;
+------+---------+------+
| host | db | user |
+------+---------+------+
| % | test | |
| % | test\_% | |
+------+---------+------+
2 rows in set (0.00 sec)
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxx
Mr Capone:
Someone told me that my linux box might not even be listening
for MyODBC driver traffic on port 3306. So, I ran netstat -tl and
netstat -ntl. Here's what I got...
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State
tcp 0 0 appserver.crci.co:mysql *:*
LISTEN
tcp 0 0 *:www *:*
LISTEN
tcp 0 0 *:ssh *:*
LISTEN
tcp 0 0 *:smtp *:*
LISTEN
mlh@appserver credifree $ netstat -ntl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State
tcp 0 0 127.0.0.1:3306 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:*
LISTEN
So maybe I'm not listening to port 3306 for MyODBC driver
traffic. I'll try to find out how to configure the linux server to
listen for such traffic on port 3306. Maybe that'll help.