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.

Accessing cPanel Database externally

Discussion in 'General Discussion' started by ezeapostle, Apr 6, 2011.

  1. ezeapostle

    ezeapostle Registered

    Joined:
    Apr 6, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hey all,

    I signed up to the forums just now as I have a problem in which I hope someone can help me.

    I am currently building my client a new website and a feature of the website is that they want both a CMS and products list. The CMS is hosted on MediaTemple (MT) - as are all my other websites and a products database is currently hosted on cPanel.

    When developing locally I ran into the problem of connecting to the products database but soon found the answer to the problem on these forums! I entered my IP address to the 'Remote Database Access Hosts' section and all worked! Now the website has been finished I'm uploading the files to my server (MT) which obviously changes the access required. I added the static IP address of my MT server and the domain itself but I still can't get access. I also used a wildcard (%) with the domain after but still no access. The wildcard itself works ('%') so I know that the access is there but iI'm not sure what I need to add!

    Can anyone help?

    Thanks in advance
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Are the username and password for the database user correct? The main reason you might not be able to connect would be the connection string doesn't have the right authentication credentials.
     
  3. ezeapostle

    ezeapostle Registered

    Joined:
    Apr 6, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hey Tristan,

    Thanks for your reply. Yes, the username and password details are correct. The wildcard option works when adding to the 'Remote Database Access Hosts' - it's just when I try and lock it down to my servers IP address/domain name that it displays a connection error. Both the IP address and domain of the server are correct but it won't accept any.

    Any other ideas/suggestions?

    Thanks in advance
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Are you certain you are using the correct IP address for the connection? On the cPanel machine to see what is connecting on port 3306 (the MySQL port), try the following command:

    Code:
    tcpdump port 3306
    You should see the connections from the MT site to your cPanel machine with the IP listed. That would be the IP you'd need to allow access. Do this when you have the wildcard (%) enabled so that the connection works. You might also need to load some of the pages that will pull up the database or whatever script you would use on the MT site to test it.
     
Loading...

Share This Page