The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mysql remote host problem

Discussion in 'General Discussion' started by Radio_Head, Nov 30, 2005.

  1. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    I have a client reporting that he is able to connect from a remote host
    if he insert on control panel the ip adress of his computer , but
    he cannot connect when he insert the domain name of his computer ..

    I checked the client domain on dnsreport and there is no error .
    The domain is using dns from https://www.dnspark.net .



    What could be the cause ? Why the client cannot connect to mysql remotely
    when he insert the domain name on remote mysql host on cpanel while
    with ip address he can connect ?

    thank you!
     
    #1 Radio_Head, Nov 30, 2005
    Last edited: Nov 30, 2005
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Let's think about this logically.

    When a remote host tries to access MySQL, it will identify itself in some form or fashion. Let's assume that, due to it being the most sensible choice, a remote host identifies itself by it's IP address.

    Therefore when a remote host tries to connect to MySQL, something along the following lines happens:

    Remote host: Can I access MySQL?
    MySQL: Who are you?
    Remote host: 123.123.123.123
    MySQL: Just a second ... [checks against list of safe hosts] OK, fine, I'll allow that

    If a domain name is specified as an allowed remote host, a DNS lookup on the domain name would be needed so as to try and match the IP address of the requesting host to the list of allowed hosts.

    Therefore the logical conclusion is that the domain name in question does not resolve to the presumed IP address.
     
  3. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
  4. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    I did some test between my 2 servers with 2 domain names working perfectly .


    I can do remote mysql connection between the 2 servers only if in Cpanel myswl remote host I insert the IP hostname of the server . If I insert one of these 2 domain names
    mysql doesn't allow me to connect remotely .

    Anyone has having the same problem with mysql remote host ?
     
  5. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    Anyone please ?
     
  6. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    anyone please ?
     
  7. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    is there some angel which can reply to this question please ?

    If I insert a domain name domain.com (instead of an ip address) on "mysql remote host" I cannot connect via mysql remotely (from that domain) . Which could be the reason ?

    The domain name domain.com is resolving the ip address, no problem, and I replicated the problem with different domains on different servers .

    Thank you for any reply !!!


    p.s. my answer (but I am not sure , for this I am searching a confirmation!) is that domain names using a shared ip address cannot connect using the domain name but only using the ip address (hostname) . Am I right ?
     
    #7 Radio_Head, Dec 6, 2005
    Last edited: Dec 6, 2005
  8. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    thanks to Zach of lifelesspeople.com (via irc on cpanel channel I found an answer to my doubts .

    It's normal that mysql doesn't permit to connect if you insert a domain name
    on cpanel remote host !.

    As Zach explained me , mysql checks the RDNS of an IP for the hostname ; mysql doesn't resolve a domain to get the IP (!).

    So suppose a client want make a mysql connection to your cpanel box from a remote domain running with a dynamic ip . If the client insert the domain name on cpanel he will not able to connect (I just explained why above) .

    Now there are 2 solutions ;

    1) He can enter the ip address each time (boring task)

    2) or he can nslookup the ip address and he can enter on remote host the result of nslookup near name="" . This solution will avoid to enter an ip address each time .
    It's the "Remote Host"


    To conclude , you cannot enter domain.com on mysql remote host.
    You can enter only an ip address (domain ip , or Remote Host of domain ip)

    Bye
     
Loading...

Share This Page