Solved

Connecting a Remote MySQL Server

Posted on 2004-10-21
640 Views
Last Modified: 2013-12-09

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
0
Question by:ColinWebdesign
    9 Comments
     
    LVL 60

    Expert Comment

    by:gheist
    1) can you ping
    2) do you see mysql server in netstat -an
    0
     

    Author Comment

    by:ColinWebdesign
    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
     
    LVL 60

    Expert Comment

    by:gheist
    1) then you sabotage network troubleshooting
    2) then you do not run mysqld listening on network interface
    0
     

    Author Comment

    by:ColinWebdesign
    1) What do you mean ?
    2) How can i check that the mysql server i listening on a Sock or a NIC ???
    0
     
    LVL 60

    Accepted Solution

    by:
    1) if you cannot confirm general network connectivity, you cannot determine cause of any network problem whatsoever.
    2) sockstat -4l
    0
     

    Author Comment

    by:ColinWebdesign
    solved...
    no route to host... solved with 'route add' my fault
    0
     
    LVL 60

    Expert Comment

    by:gheist
    Err 60 is "operation timed out", not "no route to host"
    Ping would have revealed the real problem.
    0
     

    Author Comment

    by:ColinWebdesign
    i didn't said "no route to host", there wasn't a route to host i meant
    0
     

    Author Comment

    by:ColinWebdesign
    Close this thread please...
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
    My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    877 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now