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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
gheistCommented:
1) then you sabotage network troubleshooting
2) then you do not run mysqld listening on network interface
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

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
gheistCommented:
1) if you cannot confirm general network connectivity, you cannot determine cause of any network problem whatsoever.
2) sockstat -4l
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.