1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL access from remote host problem

Discussion in 'General Discussion' started by electrify77, May 15, 2007.

  1. electrify77

    electrify77 New Member

    Joined:
    Jan 26, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have one main server and a few small shared hosting packages on various servers. My database is on the main server and I have scripts on the shared hosts which use that DB. While it was all on my main server it worked fine. But now I have some difficulties with accessing the DB from the remote hosts.

    I have:

    MySQL version 4.1.21-standard
    cPanel Build 10.9.0-STABLE 119

    The first issue is that for some odd reason when I create a user for the database I can use that user on only one remote host, although I add the IP's of all the remote hosts. It seems like only the remote host that first accessed the DB as that particular user can use that user. When I try to access the DB with the same user from a different host it will not work. When I add another user and use it instead on the 2nd remote host it works... and so one. So it's like only one remote host can use a particular user to access the DB. Is that the way it should be or there is some problem?

    OK second and more serious problem is that when I try to connect to the DB from one of the remote hosts I get this error:

    Code:
    Error opening database: Can't connect to MySQL server on 'x.x.x.x' (110)
    note: this problem occurs only on one of the remote hosts - the others work fine when each has a different user... and I have created a user for this one as well, but it will not work.

    The thing is I don't have much knowledge with mysql and I have rarely used it with remote hosts so I have pretty much NO idea what the problem could be. Everything is set correctly and DOES work on the other remote hosts that I've used it on. But for some reason this one can't connect to the DB.

    Any ideas what I can do?... also these shared hosting packs that I have don't provide SSH so I was wondering if there would be any way for me to diagnose the problem - which I also don't know how to do.

    Please help out folks!
     
  2. markfrompf

    markfrompf Member

    Joined:
    Mar 27, 2006
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles, CA
    For the mysql connection problem, have you done this:
    cPanel > MySQL® Databases > Access Hosts (bottom) > Adding that remote machine's IP?

    If it has a dynamic IP you are kind of scrwed, or you can get a free service from NO-IP.
     
  3. markfrompf

    markfrompf Member

    Joined:
    Mar 27, 2006
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles, CA
    Sorry to post 2wice in a row but I just noticed you said this happens only to one machine.

    So re-check that computer's IP (they change at random with some ISP's) and do the above. If that doesn't do it, I'd like you to tell a little more about the computers themselves and any possible firewalls installed in the MySQL server (central server.) Check that both of these computers are whitelisted in APF, etc.

    Please advise. Hope I can help. :)
     
  4. electrify77

    electrify77 New Member

    Joined:
    Jan 26, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Yes I have added the host's IP address and I believe it's not dynamic.

    Is there any certain way to check if it's dynamic although I'm 99% sure it's not.
     

Share This Page