Connecting a Remote MySQL Server


i have installed a mysql server on IP2, and i want to connect from IP1 to the mysql server on IP2, but it doesn't work.
what commands do i have to type in mysql on IP2 to grant access IP1

---
$ mysql -h ***IP2*** -u root -p
Enter password:
ERROR 2003: Can't connect to MySQL server on '***IP2***' (60)
---

Thanks in advance
ColinWebdesignAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
gheistConnect With a Mentor Commented:
1) if you cannot confirm general network connectivity, you cannot determine cause of any network problem whatsoever.
2) sockstat -4l
0
 
gheistCommented:
1) can you ping
2) do you see mysql server in netstat -an
0
 
ColinWebdesignAuthor Commented:
1) cannot ping, but is blocked (bridging firewall between)
2) no cannot see

but when i try to connect to the mysql server, i start a tcpdump on the mysql server and i can see that IP1 IS trying to connect:
09:57:47.735996 **IP1**.20015 > **IP2**.3306: S 684609730:684609730(0) win 16384 <mss 1460,nop,nop,sackOK,nop,wscale 0,nop,nop,timestamp 1080552892 0> (DF)
09:57:47.736062 **IP2**.3306 > **IP1**.20015: S 2030520059:2030520059(0) ack 684609731 win 65535 <mss 1460,nop,wscale 1,nop,nop,timestamp 558258865 1080552892> (DF)
09:57:50.730132 **IP2**.3306 > **IP1**.20015: S 2030520059:2030520059(0) ack 684609731 win 65535 <mss 1460,nop,wscale 1,nop,nop,timestamp 558259165 1080552892> (DF)
09:57:53.730843 **IP1**.20015 > **IP2**.3306: S 684609730:684609730(0) win 16384 <mss 1460,nop,nop,sackOK,nop,wscale 0,nop,nop,timestamp 1080552904 0> (DF)

but no result:

ERROR 2003: Can't connect to MySQL server on '***IP2***' (60)
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
gheistCommented:
1) then you sabotage network troubleshooting
2) then you do not run mysqld listening on network interface
0
 
ColinWebdesignAuthor Commented:
1) What do you mean ?
2) How can i check that the mysql server i listening on a Sock or a NIC ???
0
 
ColinWebdesignAuthor Commented:
solved...
no route to host... solved with 'route add' my fault
0
 
gheistCommented:
Err 60 is "operation timed out", not "no route to host"
Ping would have revealed the real problem.
0
 
ColinWebdesignAuthor Commented:
i didn't said "no route to host", there wasn't a route to host i meant
0
 
ColinWebdesignAuthor Commented:
Close this thread please...
0
All Courses

From novice to tech pro — start learning today.